Skip to content

Commit

Permalink
retrigger test
Browse files Browse the repository at this point in the history
Signed-off-by: MregXN <[email protected]>
  • Loading branch information
MregXN committed Dec 6, 2023
1 parent 1a32b58 commit 4e73241
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions test/e2e/common/server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ const bulkSubscribeClodEventTopic = "bulk-subscribe-ce-topic";
const bulkSubscribeCloudEventToRawPayloadTopic = "bulk-subscribe-ce-rp-topic";
const bulkSubscribeRawPayloadToClodEventTopic = "bulk-subscribe-rp-ce-topic";

// Set timeout to 11s for all tests
jest.setTimeout(11000);
// Set timeout to 10s for all tests
jest.setTimeout(10000);

describe("common/server", () => {
let httpServer: DaprServer;
Expand Down Expand Up @@ -139,14 +139,8 @@ describe("common/server", () => {

await setupPubSubSubscriptions();

// Sleep 1s to get subscriptions ready
await NodeJSUtil.sleep(3000);

await httpServer.start();
await grpcServer.start();

// Sleep 1s to get server ready
await NodeJSUtil.sleep(3000);
});

beforeEach(() => {
Expand All @@ -171,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, 5000));
expect(mockSubscribeStatusHandler.mock.calls.length).toBe(1);
expect(mockSubscribeStatusHandler.mock.calls[0][1]).toEqual("SUCCESS");
expect(mockSubscribeDeadletterHandler.mock.calls.length).toBe(0);
Expand Down

0 comments on commit 4e73241

Please sign in to comment.