From bb4c40b7b0f36996d3d6e23085a7549e6ce098ae Mon Sep 17 00:00:00 2001 From: Giacomo Vallorani Date: Mon, 13 Jan 2025 12:56:36 +0100 Subject: [PATCH] fix: increase test wait time --- .../java/it/pagopa/pn/paperchannel/LocalStackTestConfig.java | 3 ++- .../middleware/queue/consumer/QueueListenerTestIT.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/java/it/pagopa/pn/paperchannel/LocalStackTestConfig.java b/src/test/java/it/pagopa/pn/paperchannel/LocalStackTestConfig.java index 8443b7990..505250d5b 100644 --- a/src/test/java/it/pagopa/pn/paperchannel/LocalStackTestConfig.java +++ b/src/test/java/it/pagopa/pn/paperchannel/LocalStackTestConfig.java @@ -43,7 +43,8 @@ public class LocalStackTestConfig { .withNetwork(Network.builder().build()) .withStartupTimeout(Duration.ofSeconds(10)) .withStartupAttempts(3) - .waitingFor(Wait.forLogMessage(".*Initialization terminated.*", 1)); + .waitingFor(Wait.forLogMessage(".*Initialization terminated.*", 1)) + .withStartupTimeout(Duration.ofMinutes(3)); static { localStack.start(); diff --git a/src/test/java/it/pagopa/pn/paperchannel/middleware/queue/consumer/QueueListenerTestIT.java b/src/test/java/it/pagopa/pn/paperchannel/middleware/queue/consumer/QueueListenerTestIT.java index e62fbbbb6..a09b4706b 100644 --- a/src/test/java/it/pagopa/pn/paperchannel/middleware/queue/consumer/QueueListenerTestIT.java +++ b/src/test/java/it/pagopa/pn/paperchannel/middleware/queue/consumer/QueueListenerTestIT.java @@ -89,7 +89,7 @@ void pullExternalChannelKoInDLQAndNotSavedInPaperErrorTest() { //mi aspetto che a seguito del 400 di ext-channel, il messaggio venga letto 2 volte poiché in localstack è configurato maxReceiveCount=2 await() - .atMost(Duration.ofSeconds(10)) + .atMost(Duration.ofMinutes(3)) .untilAsserted(() -> verify(queueListenerService, times(2)).externalChannelListener(any(), anyInt())); //mi aspetto che non cia mai invocato il salvataggio della PaperError