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

Fix/issue 1856 aborted is not success #1875

Merged
merged 3 commits into from
Mar 4, 2025

Conversation

l-1squared
Copy link
Collaborator

No description provided.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
levrik Levin Rickert
relates to Issue-1625

Signed-off-by: l-1squared <30831153+l-1squared@users.noreply.github.com>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
relates to Issue-1625

Signed-off-by: l-1squared <30831153+l-1squared@users.noreply.github.com>
RobertSchueler
RobertSchueler previously approved these changes Feb 28, 2025
@@ -87,6 +83,8 @@ public void afterTestExecution(ExtensionContext context) throws Exception {
try {
if (context.getExecutionException().isPresent() && !ThrowableUtil.isAssumptionException(context.getExecutionException().get())) {
scenario.getExecutor().failed(context.getExecutionException().get());
} else if (context.getExecutionException().isPresent() && ThrowableUtil.isAssumptionException(context.getExecutionException().get())) {
scenario.getExecutor().aborted(context.getExecutionException().get());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably this would be a bit easier to read with a submethod that uses an early return, i.e.

if (!context.getExecutionException().isPresent()) { return;}
if (ThrowableUtil.isAssumptionException(context.getExecutionException().get())) {
  scenario.getExecutor().aborted(context.getExecutionException().get());
  return;
}
scenario.getExecutor().failed(context.getExecutionException().get());

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nice.
To lazy to refactor, immediately caught :D

Signed-off-by: l-1squared <30831153+l-1squared@users.noreply.github.com>
@l-1squared l-1squared force-pushed the fix/Issue-1856-aborted-is-not-success branch from 6b899c9 to a4b18d7 Compare February 28, 2025 14:59
@l-1squared l-1squared merged commit d26946b into master Mar 4, 2025
18 checks passed
@l-1squared l-1squared deleted the fix/Issue-1856-aborted-is-not-success branch March 4, 2025 16:23
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.

Failing JUnit5 assumptions outside of stage are handled as successful test case
2 participants