Skip to content

Commit 6ec55c3

Browse files
timjadas7pad
andauthored
Reduce test flakiness: Give agent startup more time (10s -> 30s) (jenkinsci#11153)
Co-authored-by: Jakob Ackermann <das7pad@outlook.com>
1 parent c5b876b commit 6ec55c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/src/test/java/hudson/model/ComputerTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
import java.lang.ref.WeakReference;
5353
import java.net.HttpURLConnection;
5454
import java.nio.charset.StandardCharsets;
55+
import java.time.Duration;
5556
import java.util.Map;
5657
import java.util.concurrent.TimeUnit;
5758
import java.util.logging.Level;
@@ -332,7 +333,7 @@ public void isConnectedTest() throws Exception {
332333

333334
// Connect the computer
334335
computer.connect(false);
335-
await("computer should be online after connect").until(() -> computer.isOnline(), is(true));
336+
await("computer should be online after connect").atMost(Duration.ofSeconds(30)).until(() -> computer.isOnline(), is(true));
336337
assertThat(computer.isConnected(), is(true));
337338
assertThat(computer.isOffline(), is(false));
338339

0 commit comments

Comments
 (0)