Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double the sleep delay in IdempotentFunctionIntegrationTest #85

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void testIdempotencyKey() throws Exception {
String eventWithIdempotencyKey = InngestFunctionTestHelpers.sendEvent(client, "test/idempotent", dataPayload).getIds()[0];
String eventWithSameIdempotencyKey = InngestFunctionTestHelpers.sendEvent(client, "test/idempotent", dataPayload).getIds()[0];

Thread.sleep(2000);
Thread.sleep(4000);

// With the same idempotency key, only one of the events should have run
RunEntry<Object> firstRun = devServer.runsByEvent(eventWithIdempotencyKey).first();
Expand All @@ -41,7 +41,7 @@ void testIdempotencyKey() throws Exception {
Map differentDataPayload = Collections.singletonMap("companyId", 43);
String eventWithDifferentIdempotencyKey = InngestFunctionTestHelpers.sendEvent(client, "test/idempotent", differentDataPayload).getIds()[0];

Thread.sleep(2000);
Thread.sleep(4000);

// Event with a different idempotency key will run once
RunEntry<Object> otherRun = devServer.runsByEvent(eventWithDifferentIdempotencyKey).first();
Expand Down
Loading