Skip to content
Permalink
Browse files
Merge pull request #81 from jglick/getStatus-JENKINS-39275
[JENKINS-39275] Extend time limit to virtual thread dump
  • Loading branch information
jglick committed Oct 31, 2016
2 parents 4c00f99 + 6fe7f28 commit 8803767e994f24d8606c80ace97f7468deaaf34d
Showing with 3 additions and 12 deletions.
  1. +1 −1 pom.xml
  2. +2 −11 src/main/java/org/jenkinsci/plugins/workflow/cps/CpsThreadDump.java
@@ -69,7 +69,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<version>2.4</version>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
@@ -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;

@@ -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 {
@@ -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 {

0 comments on commit 8803767

Please sign in to comment.