Skip to content

Commit aeeca93

Browse files
artembilanspring-builds
authored andcommitted
Increase await() timeout for 30 seconds in MQTT tests
# Conflicts: # spring-integration-mqtt/src/test/java/org/springframework/integration/mqtt/ClientManagerBackToBackTests.java (cherry picked from commit 6eee926)
1 parent 0fe2623 commit aeeca93

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-integration-mqtt/src/test/java/org/springframework/integration/mqtt/ResubscribeAfterAutomaticReconnectTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 the original author or authors.
2+
* Copyright 2023-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
1616

1717
package org.springframework.integration.mqtt;
1818

19+
import java.time.Duration;
1920
import java.util.concurrent.CountDownLatch;
2021
import java.util.concurrent.TimeUnit;
2122

@@ -82,7 +83,7 @@ void messageReceivedAfterResubscriptionOnLostConnection() throws InterruptedExce
8283

8384
assertThat(this.config.subscribeSecondLatch.await(10, TimeUnit.SECONDS)).isTrue();
8485

85-
await().untilAsserted(() -> this.mqttOutFlowInput.send(testMessage));
86+
await().atMost(Duration.ofSeconds(30)).untilAsserted(() -> this.mqttOutFlowInput.send(testMessage));
8687
assertThat(this.fromMqttChannel.receive(10_000)).isNotNull();
8788

8889
// Re-subscription on channel adapter restart with cleanStart

0 commit comments

Comments
 (0)