Skip to content

Commit 64ee6bf

Browse files
authored
Fixing use of Timeout (#464)
1 parent 34dd333 commit 64ee6bf

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/test/java/hudson/plugins/sshslaves/agents/AgentConnectionBase.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,15 @@ public class AgentConnectionBase {
4646
@ClassRule
4747
public static CheckIsDockerAvailable isDockerAvailable = new CheckIsDockerAvailable();
4848

49-
@Rule
49+
@Rule(order = 10)
5050
public JenkinsRule j = new JenkinsRule();
5151

52-
@Rule
53-
public Timeout globalTimeout= new Timeout(4, TimeUnit.MINUTES);
52+
@Rule(order = -10)
53+
public Timeout globalTimeout = Timeout.builder().withTimeout(10, TimeUnit.MINUTES).withLookingForStuckThread(true).build();
54+
55+
protected AgentConnectionBase() {
56+
j.timeout = 0;
57+
}
5458

5559
protected boolean isSuccessfullyConnected(Node node) throws IOException, InterruptedException {
5660
int count = 0;

0 commit comments

Comments
 (0)