From befe29b1d29e2cca38ff29d2f231313fe4728967 Mon Sep 17 00:00:00 2001 From: KiKoS0 <22998716+KiKoS0@users.noreply.github.com> Date: Thu, 12 Sep 2024 04:16:52 +0100 Subject: [PATCH] Double the sleep delay in IdempotentFunctionIntegrationTest (#85) --- .../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();