From 93c00a1572c2a4342372576d85b33d6d6cf8cb04 Mon Sep 17 00:00:00 2001 From: liangtongchuan Date: Sun, 7 Mar 2021 16:21:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=EF=BC=9A=E6=B8=85=E7=90=86?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E5=A2=9E=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/test/chat.test.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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);