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

WorkflowRunRestartTest.resumeDisabled should not assume that the execution is not loaded #160

Merged

Conversation

jglick
Copy link
Member

@jglick jglick commented Apr 9, 2020

From #159 I see an apparent mistake in #93. The execution is indeed loaded after a restart:

java.lang.Exception: Stack trace
	at java.lang.Thread.dumpStack(Thread.java:1336)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.getExecution(WorkflowRun.java:711)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun$Owner.get(WorkflowRun.java:957)
	at org.jenkinsci.plugins.workflow.flow.FlowExecutionList$1.computeNext(FlowExecutionList.java:65)
	at org.jenkinsci.plugins.workflow.flow.FlowExecutionList$1.computeNext(FlowExecutionList.java:57)
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
	at org.jenkinsci.plugins.workflow.flow.FlowExecutionList$ItemListenerImpl.onLoaded(FlowExecutionList.java:178)
	at jenkins.model.Jenkins.<init>(Jenkins.java:989)
	at …

which does not seem improper. The test may have passed accidentally due to a race condition with the restart.

@dwnusbaum dwnusbaum self-requested a review April 9, 2020 14:13
@@ -99,7 +99,6 @@
assertTrue(p.isResumeBlocked());
WorkflowRun b = p.getBuildByNumber(1);
r.waitForCompletion(b);
assertFalse(b.executionLoaded);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we invert the assertion instead of deleting it? Would pulling in jenkinsci/jenkins-test-harness#210 make the behavior consistent?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we invert the assertion

Not sure I see the point.

Would pulling in jenkinsci/jenkins-test-harness#210 make the behavior consistent?

Not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants