diff --git a/inngest-spring-boot-demo/src/test/java/com/inngest/springbootdemo/IdempotentFunctionIntegrationTest.java b/inngest-spring-boot-demo/src/test/java/com/inngest/springbootdemo/IdempotentFunctionIntegrationTest.java index 21caa47c..2eb6f531 100644 --- a/inngest-spring-boot-demo/src/test/java/com/inngest/springbootdemo/IdempotentFunctionIntegrationTest.java +++ b/inngest-spring-boot-demo/src/test/java/com/inngest/springbootdemo/IdempotentFunctionIntegrationTest.java @@ -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 firstRun = devServer.runsByEvent(eventWithIdempotencyKey).first(); @@ -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 otherRun = devServer.runsByEvent(eventWithDifferentIdempotencyKey).first();