Skip to content

[SUREFIRE-862, SUREFIRE-3178] Handle missing Failsafe summary files - #3417

Merged
olamy merged 2 commits into
apache:masterfrom
wilx:issue-862-failsafe-missing-summaries
Aug 8, 2026
Merged

olamy merged 2 commits into
apache:masterfrom
wilx:issue-862-failsafe-missing-summaries

Conversation

@wilx

@wilx wilx commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #862.
Fixes #3178.

Summary

Failsafe 3.3.1 stopped writing a summary file when an integration-test
execution runs no tests. This is intentional, but VerifyMojo still tried
to read every path configured through summaryFiles, causing verification
of POM modules to fail with FileNotFoundException.

The same missing summary also caused verify to return before the normal
failIfNoTests check, so an empty discovered test class incorrectly produced
a successful build even with failIfNoTests=true.

This change:

Validation

  • mvn clean install with JDK 17: passed (all 17 reactor modules).
  • mvn -Prun-its clean install with JDK 17: passed (760 tests,
    0 failures, 0 errors, 153 skipped).
  • Focused VerifyMojoTest unit tests: 6 tests passed.
  • Surefire862MissingSummaryFilesIT: 1 integration test passed.
  • Surefire3178FailIfNoTestsIT: 1 integration test passed through the
    run-its profile.
  • The reproducer linked from Build of pom modules brokenΒ #862 succeeds with the locally built snapshot.
  • The reproducer from failIfNoTests=true with failsafe-plugin does not fail even if verify stage shows No tests to run.Β #3178 fails as configured with the locally built
    snapshot; its reported 3.3.0 failure and 3.3.1 success were also reproduced.

The JDK 8 build in this environment is blocked by the unrelated existing
ProcessCheckerTest.shouldHavePidAtBegin start-time assertion; the same test
and both complete builds pass with JDK 17.

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean install to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its clean install).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@wilx
wilx marked this pull request as ready for review August 8, 2026 19:28
wilx added 2 commits August 8, 2026 21:41
Skip configured summary files that were not created because no integration tests ran. Log each missing path at debug level and cover all-missing and mixed-summary cases.

Fixes apache#862.
Let VerifyMojo report a no-tests result when failIfNoTests is enabled even if integration-test did not write a summary file. Cover the empty test class regression with unit and integration tests.

Fixes apache#3178.
@wilx
wilx force-pushed the issue-862-failsafe-missing-summaries branch from a542b1b to aa17756 Compare August 8, 2026 19:41
@wilx wilx changed the title [SUREFIRE-862] Ignore missing Failsafe summary files [SUREFIRE-862, SUREFIRE-3178] Handle missing Failsafe summary files Aug 8, 2026
@olamy olamy added the bug Something isn't working label Aug 8, 2026
@olamy
olamy merged commit 8027cc1 into apache:master Aug 8, 2026
14 checks passed
@github-actions github-actions Bot added this to the 3.6.0-M2 milestone Aug 8, 2026
@wilx
wilx deleted the issue-862-failsafe-missing-summaries branch August 8, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

failIfNoTests=true with failsafe-plugin does not fail even if verify stage shows No tests to run. Build of pom modules broken

2 participants