From 962ad81b39a3f5c604e5e719fb78131a51aec29b Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 14 Apr 2021 14:36:50 -0400 Subject: [PATCH] Do not periodically JenkinsRule.dumpThreads when debugging --- src/main/java/org/jvnet/hudson/test/RealJenkinsRule.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/jvnet/hudson/test/RealJenkinsRule.java b/src/main/java/org/jvnet/hudson/test/RealJenkinsRule.java index 298bdfdd3..88bcfce69 100644 --- a/src/main/java/org/jvnet/hudson/test/RealJenkinsRule.java +++ b/src/main/java/org/jvnet/hudson/test/RealJenkinsRule.java @@ -506,7 +506,9 @@ public static void register() throws Exception { }); JenkinsRule._configureUpdateCenter(j); System.err.println("RealJenkinsRule ready"); - Timer.get().scheduleAtFixedRate(JenkinsRule::dumpThreads, 2, 2, TimeUnit.MINUTES); + if (!new DisableOnDebug(null).isDebugging()) { + Timer.get().scheduleAtFixedRate(JenkinsRule::dumpThreads, 2, 2, TimeUnit.MINUTES); + } } @Override public String getUrlName() { return "RealJenkinsRule";