Skip to content
Permalink
Browse files
[JENKINS-39275] Extend time limit to virtual thread dump.
  • Loading branch information
jglick committed Oct 31, 2016
1 parent 4c00f99 commit a08717eaea66e211a6d0e01bbf171b814f8bf96c
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-SNAPSHOT</version> <!-- TODO https://github.com/jenkinsci/workflow-step-api-plugin/pull/12 -->
</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 a08717e

Please sign in to comment.