From c61055004cf4158b3baec1028352abf6848ab0bb Mon Sep 17 00:00:00 2001 From: Riadh <22998716+KiKoS0@users.noreply.github.com> Date: Thu, 12 Sep 2024 03:20:36 +0200 Subject: [PATCH] Double the sleep delay in IdempotentFunctionIntegrationTest --- .../springbootdemo/IdempotentFunctionIntegrationTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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();