Skip to content

Do not fail mergeTestReports for partial previous test task runs#15563

Open
jdaugherty wants to merge 2 commits into7.1.xfrom
interrupted-test-phase-issue
Open

Do not fail mergeTestReports for partial previous test task runs#15563
jdaugherty wants to merge 2 commits into7.1.xfrom
interrupted-test-phase-issue

Conversation

@jdaugherty
Copy link
Copy Markdown
Contributor

If a user:

  1. runs integrationTest - and it's terminated (OOM, etc) before finish
  2. then runs smokeTest

The mergeTestReports will fail b/c it's partially run, an error like this will show:

  Caused by: java.lang.IllegalStateException: Test outputs data file '$PROJECT_DIR/build/test-results/gebTest/binary/output.bin' exists but the index file '$PROJECT_DIR/build/test-results/gebTest/binary/output.bin.idx' does not
    at org.gradle.api.internal.tasks.testing.junit.result.TestOutputStore$Reader.<init>(TestOutputStore.java:231)
    at org.gradle.api.internal.tasks.testing.junit.result.TestOutputStore.reader(TestOutputStore.java:391)
    at org.gradle.api.internal.tasks.testing.junit.result.TestOutputStoreBackedResultsProvider.<init>(TestOutputStoreBackedResultsProvider.java:28)
    at org.gradle.api.internal.tasks.testing.junit.result.BinaryResultBackedTestResultsProvider.<init>(BinaryResultBackedTestResultsProvider.java:27)
    at org.gradle.util.internal.CollectionUtils.collect(CollectionUtils.java:192)
    at org.gradle.api.internal.tasks.testing.LegacyTestReportGenerator.lambda$createAggregateProvider$1(LegacyTestReportGenerator.java:54)
    at org.gradle.api.internal.tasks.testing.LegacyTestReportGenerator.hasResults(LegacyTestReportGenerator.java:71)
    at org.gradle.api.tasks.testing.TestReport.generateReport(TestReport.java:186)
    ... 125 more

This is because the index file isn't generated until after the task finishes. This PR simply removes these invalid states so the test report task doesn't fail.

@jdaugherty jdaugherty force-pushed the interrupted-test-phase-issue branch from ab4d44f to 46e57a1 Compare April 8, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant