Skip to content

Commit

Permalink
[JENKINS-39275] Extend time limit to virtual thread dump.
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Oct 31, 2016
1 parent 4c00f99 commit a08717e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -69,7 +69,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<version>2.4</version>
<version>2.5-SNAPSHOT</version> <!-- TODO https://github.com/jenkinsci/workflow-step-api-plugin/pull/12 -->
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
Expand Down
Expand Up @@ -13,8 +13,7 @@
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nonnull;
import org.jenkinsci.plugins.workflow.steps.StepDescriptor;

Expand All @@ -25,8 +24,6 @@
*/
public final class CpsThreadDump {

private static final Logger LOGGER = Logger.getLogger(CpsThreadDump.class.getName());

private final List<ThreadInfo> threads = new ArrayList<ThreadInfo>();

public static final class ThreadInfo {
Expand All @@ -49,13 +46,7 @@ private ThreadInfo(List<CpsThread> e) {
if (s !=null) {
StepDescriptor d = ((CpsStepContext) s.getContext()).getStepDescriptor();
if (d != null) {
String status = null;
try {
status = s.getStatus();
} catch (RuntimeException x) { // try our best to show something meaningful for the rest of the stack trace
status = "failed to get status";
LOGGER.log(Level.WARNING, null, x);
}
String status = s.getStatusBounded(3, TimeUnit.SECONDS);
if (status != null) {
stack.add(new StackTraceElement("DSL", d.getFunctionName(), status, -1));
} else {
Expand Down

0 comments on commit a08717e

Please sign in to comment.