2

我正在尝试使用 tsung 创建负载测试场景。我需要使用 2 种类型的会话:ts_jabber 和 ts_http。在 HTTP 来回切换后,我可以继续使用 Jabber 会话吗?这是我的代码:

<sessions>
   <session probability="100" name="session1" type="ts_http">
     //some code
   <change_type  new_type="ts_jabber" host="*****" port="5222" server_type="tcp" store = "true"/>

   <request subst="true">
         <jabber type="connect" ack="local">
             <xmpp_authenticate username="%%_loginForChat%%" passwd="%%_password%%"/>
         </jabber>
   </request>

   <thinktime value="10"></thinktime>

   <transaction name="authenticate">
     <request>
        <jabber type="auth_sasl" ack="local"></jabber></request>
     <request>
        <jabber type="connect" ack="local"></jabber> </request>
     <request>
        <jabber type="auth_sasl_bind" ack="local" ></jabber></request>
     <request>
        <jabber type="auth_sasl_session" ack="local" ></jabber></request>
   </transaction>

   <change_type new_type="ts_http" host="******" port="80" server_type="tcp"
       //some code
   <change_type  new_type="ts_jabber" host="*******" port="5222" server_type="tcp"  />

   <request subst="true">
        <jabber type="muc:join" ack="local" room="%%_app_id%%_%%_groupChat_room_id%%"              nick="%%_loginForChat%%"/>
   </request>

</session>

运行此代码后,我收到一个错误:“错误:未知 msg {tcp_closed,#Port<0.1183>} 接收状态为 wait_ack,停止”
请帮助我。

4

0 回答 0