Skip to content

Commit ea76709

Browse files
committed
increased wait time for stage completion
1 parent 7c3049b commit ea76709

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/AbstractCommandStrategyTest.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public abstract class AbstractCommandStrategyTest {
6161
protected static final long THING_SIZE_LIMIT_BYTES = Long.parseLong(
6262
System.getProperty(DittoSystemProperties.DITTO_LIMITS_THINGS_MAX_SIZE_BYTES, "-1"));
6363

64+
private static final Duration COMPLETION_WAIT_TIME = Duration.ofSeconds(15);
65+
6466
protected static DittoDiagnosticLoggingAdapter logger;
6567

6668
@ClassRule
@@ -220,10 +222,11 @@ protected static <T extends ThingModifiedEvent<?>> T assertStagedModificationRes
220222
eq(null));
221223
assertThat(eventStage.getValue()).isInstanceOf(CompletionStage.class);
222224
CompletableFutureAssert.assertThatCompletionStage(eventStage.getValue())
223-
.isCompletedWithValueMatchingWithin(t -> eventClazz.isAssignableFrom(t.getClass()), Duration.ofSeconds(5));
225+
.isCompletedWithValueMatchingWithin(t -> eventClazz.isAssignableFrom(t.getClass()),
226+
COMPLETION_WAIT_TIME);
224227
assertThat(responseStage.getValue()).isInstanceOf(CompletionStage.class);
225228
CompletableFutureAssert.assertThatCompletionStage(responseStage.getValue())
226-
.isCompletedWithValueMatchingWithin(r -> r.equals(expectedResponse), Duration.ofSeconds(5));
229+
.isCompletedWithValueMatchingWithin(r -> r.equals(expectedResponse), COMPLETION_WAIT_TIME);
227230
return (T) eventStage.getValue().toCompletableFuture().join();
228231
}
229232

0 commit comments

Comments
 (0)