Skip to content

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

Merged
jdaugherty merged 2 commits into7.1.xfrom
interrupted-test-phase-issue
Apr 9, 2026
Merged

Do not fail mergeTestReports for partial previous test task runs#15563
jdaugherty merged 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
@testlens-app
Copy link
Copy Markdown

testlens-app bot commented Apr 8, 2026

✅ All tests passed ✅

🏷️ Commit: 46e57a1
▶️ Tests: 5162 executed
⚪️ Checks: 35/35 completed


Learn more about TestLens at testlens.app.

constraints {
}
}

Copy link
Copy Markdown
Contributor Author

@jdaugherty jdaugherty Apr 8, 2026

Choose a reason for hiding this comment

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

FYI: This may be a regression with 7.1. There was a swallowed exception I noticed while working on this change because these views didn't exist in this project. It may be related to Scott's wildcard mapping change. Although, I think it doesn't have a real impact so it's probably ok.

@bito-code-review
Copy link
Copy Markdown

The change removes URL mappings to views ('/index', '/error', '/notFound') that don't exist in the project, which were causing swallowed exceptions in Grails 7.1, likely due to wildcard mapping updates. Removing them prevents errors without impact, as these are default fallbacks. This appears to be a valid fix for the regression.

grails-test-examples/test-phases/grails-app/controllers/testphases/UrlMappings.groovy

'/'(view: '/index')
        '500'(view: '/error')
        '404'(view: '/notFound')

@jdaugherty jdaugherty merged commit cc119f5 into 7.1.x Apr 9, 2026
62 of 63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants