@@ -48,7 +48,7 @@ public function testCreateClient()
4848 $ factory = new Factory (self ::$ loop );
4949 $ promise = $ factory ->createClient (self ::$ host );
5050
51- $ client = Block \await ($ promise , self ::$ loop );
51+ $ client = Block \await ($ promise , self ::$ loop, 10.0 );
5252
5353 return $ client ;
5454 }
@@ -102,6 +102,9 @@ public function testSendClientLogin(Client $client, $message)
102102 $ message = $ this ->awaitMessage ($ client );
103103 $ this ->assertEquals ('ClientLoginAck ' , $ message ['MsgType ' ]);
104104
105+ $ message = $ this ->awaitMessage ($ client );
106+ $ this ->assertEquals ('SessionInit ' , $ message ['MsgType ' ]);
107+
105108 return $ message ;
106109 }
107110
@@ -127,7 +130,7 @@ public function testSendHeartBeat(Client $client)
127130
128131 $ client ->sendHeartBeatRequest ($ time );
129132
130- $ received = Block \await ($ promise , self ::$ loop );
133+ $ received = Block \await ($ promise , self ::$ loop, 10.0 );
131134
132135 $ this ->assertEquals ($ time , $ received );
133136 }
@@ -143,7 +146,7 @@ public function testClose(Client $client)
143146
144147 $ client ->close ();
145148
146- return Block \await ($ promise , self ::$ loop );
149+ return Block \await ($ promise , self ::$ loop, 10.0 );
147150 }
148151
149152 private function awaitMessage (Client $ client )
@@ -153,6 +156,6 @@ private function awaitMessage(Client $client)
153156
154157 $ client ->once ('error ' , $ reject );
155158 $ client ->once ('close ' , $ reject );
156- }), self ::$ loop );
159+ }), self ::$ loop, 10.0 );
157160 }
158161}
0 commit comments