Skip to content

Commit

Permalink
Double the sleep delay in IdempotentFunctionIntegrationTest (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
KiKoS0 authored Sep 12, 2024
1 parent 31add6b commit befe29b
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit befe29b

Please sign in to comment.