Skip to content
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

CpsFlowExecutionTest.iterateAfterSuspend flaky #945

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

jglick
Copy link
Member

@jglick jglick commented Oct 15, 2024

Introduced in #797, and seems to flake a lot, e.g.: https://github.com/jenkinsci/workflow-cps-plugin/runs/31557729869

Reproducible using

diff --git plugin/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsThreadGroup.java plugin/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsThreadGroup.java
index 51518e6f..519e1f14 100644
--- plugin/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsThreadGroup.java
+++ plugin/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsThreadGroup.java
@@ -652,6 +652,11 @@ public final class CpsThreadGroup implements Serializable {
     }
 
     void shutdown() {
+        try {
+            Thread.sleep(1000);
+        } catch (InterruptedException x) {
+            x.printStackTrace();
+        }
         runner.shutdown();
     }
 

@jglick jglick requested a review from a team as a code owner October 15, 2024 14:47
@jglick jglick added the tests label Oct 15, 2024
@jglick jglick enabled auto-merge October 15, 2024 14:50
@jglick jglick merged commit 567e2a1 into jenkinsci:master Oct 15, 2024
17 checks passed
@jglick jglick deleted the iterateAfterSuspend branch October 15, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants