diff --git a/game-server/test/chat.test.ts b/game-server/test/chat.test.ts index 8537ebccc..e74b14456 100644 --- a/game-server/test/chat.test.ts +++ b/game-server/test/chat.test.ts @@ -30,13 +30,11 @@ function testGroupMsg(pinusClient: PinusWSClient, roleInfo: any, pinusClientT: P const roomId = `${channel}_${channelId}`; pinusClientT.on(ON_GROUP_MSG_ROUTE, (res) => { checkSuccessResponse(res); - console.log('got res 1:', roomId, res); checkGroupMsg(res.data, roleInfo.roleId, roomId, TEXT_MSG.content); msgReceiveCnt += 1; }); pinusClient.on(ON_GROUP_MSG_ROUTE, (res) => { checkSuccessResponse(res); - console.log('got res 2:', roomId, res); checkGroupMsg(res.data, roleInfo.roleId, roomId, TEXT_MSG.content); msgReceiveCnt += 1; }); @@ -75,6 +73,7 @@ describe('聊天测试', function() { afterEach(function(done) { pinusClient.disconnect(); pinusClientT.disconnect(); + // disconnect 后等待 500ms,供服务器清理环境、退出频道等 setTimeout(() => { done(); }, 500);