Skip to content

Honor causeOfStoppage even when process exits with code 0#620

Open
jglick wants to merge 1 commit into
jenkinsci:masterfrom
jglick:causeOfStoppage
Open

Honor causeOfStoppage even when process exits with code 0#620
jglick wants to merge 1 commit into
jenkinsci:masterfrom
jglick:causeOfStoppage

Conversation

@jglick
Copy link
Copy Markdown
Member

@jglick jglick commented May 11, 2026

Fixes #619. Amending #75.

@jglick jglick added the bug label May 11, 2026
@jglick jglick requested a review from a team as a code owner May 11, 2026 21:56
@jglick jglick added the bug label May 11, 2026
// Would have succeeded before https://github.com/jenkinsci/workflow-durable-task-step-plugin/pull/75.
j.assertBuildStatus(Result.ABORTED, b);
j.waitForMessage("Timeout has been exceeded", b); // TODO assertLogContains fails unless a sleep is introduced; possible race condition in waitForCompletion
j.assertLogContains("Timeout has been exceeded", b);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

reverting #84 (comment)

Comment on lines +681 to +683
if (causeOfStoppage != null) {
getContext().onFailure(causeOfStoppage);
} else if (returnStatus) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Trying to make the logic of this method more legible.

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.

causeOfStoppage ignored by handleExit if exitCode == 0

1 participant