From 7551288e9ab5f040c186e7bd2cc51f094ae2ecba Mon Sep 17 00:00:00 2001 From: MregXN Date: Wed, 29 Nov 2023 21:02:15 +0800 Subject: [PATCH] test Signed-off-by: MregXN --- test/e2e/common/server.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/common/server.test.ts b/test/e2e/common/server.test.ts index 5d70d34d..fd831a35 100644 --- a/test/e2e/common/server.test.ts +++ b/test/e2e/common/server.test.ts @@ -12,7 +12,7 @@ limitations under the License. */ import { CommunicationProtocolEnum, DaprServer, DaprPubSubStatusEnum } from "../../../src"; -import * as NodeJSUtil from "../../../src/utils/NodeJS.util"; +// import * as NodeJSUtil from "../../../src/utils/NodeJS.util"; const serverHost = "127.0.0.1"; const serverGrpcPort = "50001"; @@ -140,7 +140,7 @@ describe("common/server", () => { await grpcServer.start(); // Sleep 3s to get everything ready - await NodeJSUtil.sleep(3000); + //await NodeJSUtil.sleep(3000); }); beforeEach(() => { @@ -165,7 +165,7 @@ describe("common/server", () => { const res = await server.client.pubsub.publish(pubSubName, getTopic(topicWithStatusCb, protocol), "SUCCESS"); expect(res.error).toBeUndefined(); // Delay a bit for event to arrive - await new Promise((resolve, _reject) => setTimeout(resolve, 1000)); + await new Promise((resolve, _reject) => setTimeout(resolve, 4000)); expect(mockSubscribeStatusHandler.mock.calls.length).toBe(1); expect(mockSubscribeStatusHandler.mock.calls[0][1]).toEqual("SUCCESS"); expect(mockSubscribeDeadletterHandler.mock.calls.length).toBe(0);