-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing use of Timeout
#464
Conversation
From a @cloudbees CI run of
|
@@ -46,11 +46,15 @@ public class AgentConnectionBase { | |||
@ClassRule | |||
public static CheckIsDockerAvailable isDockerAvailable = new CheckIsDockerAvailable(); | |||
|
|||
@Rule | |||
@Rule(order = 10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, the 3m default timeout in JenkinsRule
superseded the expressed timeout here.
public JenkinsRule j = new JenkinsRule(); | ||
|
||
@Rule | ||
public Timeout globalTimeout= new Timeout(4, TimeUnit.MINUTES); | ||
@Rule(order = -10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default order is -1 so this seems to make it apply to @Rule GenericContainer
in subclasses.
public Timeout globalTimeout = Timeout.builder().withTimeout(10, TimeUnit.MINUTES).withLookingForStuckThread(true).build(); | ||
|
||
protected AgentConnectionBase() { | ||
j.timeout = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant.
Still trying to fix timeouts occurring in CI from this plugin.
shows the first test,
AgentCurve25519Sha256ConnectionTest
, taking >4m (top
shows somedocker
, a lot ofdpkg
). Subsequent tests mostly run in <10s, so layer caching is effective.