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 d6e98d5 commit 0cea6bd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/e2e/common/server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ limitations under the License.
*/

import { CommunicationProtocolEnum, DaprServer, DaprPubSubStatusEnum } from "../../../src";
//import * as NodeJSUtil from "../../../src/utils/NodeJS.util";
import { sleep } from "../../../src/utils/NodeJS.util";

Check failure on line 15 in test/e2e/common/server.test.ts

View workflow job for this annotation

GitHub Actions / build (16.14.0)

'sleep' is defined but never used. Allowed unused vars must match /^_/u

Check failure on line 15 in test/e2e/common/server.test.ts

View workflow job for this annotation

GitHub Actions / test-e2e

'sleep' is defined but never used. Allowed unused vars must match /^_/u
import * as NodeJSUtil from "../../../src/utils/NodeJS.util";

const serverHost = "127.0.0.1";
const serverGrpcPort = "50001";
Expand Down Expand Up @@ -138,9 +139,10 @@ describe("common/server", () => {
});

await setupPubSubSubscriptions();

await NodeJSUtil.sleep(2000)
await httpServer.start();
await grpcServer.start();
await NodeJSUtil.sleep(2000)
});

beforeEach(() => {
Expand All @@ -165,7 +167,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, 5000));
await new Promise((resolve, _reject) => setTimeout(resolve, 2000));
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 0cea6bd

Please sign in to comment.