Skip to content

Commit 730a81c

Browse files
committed
Merge branch '3.1.x' into 3.2.x
Closes gh-39789
2 parents 844218a + dd38fb8 commit 730a81c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/process/DisabledIfProcessUnavailableCondition.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-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.
@@ -19,6 +19,7 @@
1919
import java.lang.reflect.AnnotatedElement;
2020
import java.util.ArrayList;
2121
import java.util.List;
22+
import java.util.concurrent.TimeUnit;
2223
import java.util.stream.Stream;
2324

2425
import org.junit.jupiter.api.extension.ConditionEvaluationResult;
@@ -67,7 +68,7 @@ private void check(String[] command) {
6768
ProcessBuilder processBuilder = new ProcessBuilder(command);
6869
try {
6970
Process process = processBuilder.start();
70-
process.waitFor();
71+
Assert.isTrue(process.waitFor(30, TimeUnit.SECONDS), "Process did not exit within 30 seconds");
7172
Assert.state(process.exitValue() == 0, () -> "Process exited with %d".formatted(process.exitValue()));
7273
process.destroy();
7374
}

0 commit comments

Comments
 (0)