Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
retrigger test
Browse files Browse the repository at this point in the history
Signed-off-by: MregXN <[email protected]>
MregXN committed Dec 6, 2023
1 parent d6e98d5 commit afbd69a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/e2e/common/server.test.ts
Original file line number Diff line number Diff line change
@@ -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";
@@ -138,9 +138,10 @@ describe("common/server", () => {
});

await setupPubSubSubscriptions();

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

beforeEach(() => {
@@ -165,7 +166,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);

0 comments on commit afbd69a

Please sign in to comment.