Skip to content

Ensure that the statistics filename is calculated only once. - #3326

Merged
olamy merged 2 commits into
apache:masterfrom
c00ler:fix/reuse-run-statistics-file
Mar 19, 2026
Merged

olamy merged 2 commits into
apache:masterfrom
c00ler:fix/reuse-run-statistics-file

Conversation

@c00ler

@c00ler c00ler commented Mar 17, 2026 •

Copy link
Copy Markdown
Contributor

This change is a follow-up for changes in #3247.

The issue is that getStatisticsFile() uses getConfigChecksum(), which relies on potentially mutable values such as system properties, provider properties, etc. getStartupReportConfiguration() is called from the context that changes the state of system properties:

createCopyAndReplaceForkNumPlaceholder(effectiveProperties, 1).copyToSystemProperties();
. Due to that, the value returned by getStatisticsFile() is different from the value stored in the RunOrderParameters. This change ensures that the statistics filename is calculated only once and reused.

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.

The issue is that `getStatisticsFile()` uses `getConfigChecksum()` which relies on potentially mutable values such as system properties, provider properties, etc. `getStatisticsFile()` was called from different places with changes to the system properties in between, leading to different filenames.
@olamy

olamy commented Mar 18, 2026

Copy link
Copy Markdown
Member

LGTM.
Would you mind rebase this with last master changes (sorry there was a failure) as is we will have full build running for the PR.
Thanks

@olamy olamy added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Mar 19, 2026
@olamy olamy added this to the 3.6.0.M1 milestone Mar 19, 2026
@olamy olamy self-assigned this Mar 19, 2026
@olamy
olamy merged commit 16cabe5 into apache:master Mar 19, 2026
14 checks passed
@olamy

olamy commented Mar 19, 2026

Copy link
Copy Markdown
Member

@c00ler All merged. Thanks for your contribution,
I will cherry-pick to 3.5.x branch

olamy pushed a commit to olamy/maven-surefire that referenced this pull request Mar 19, 2026
…3326)

The issue is that `getStatisticsFile()` uses `getConfigChecksum()` which relies on potentially mutable values such as system properties, provider properties, etc. `getStatisticsFile()` was called from different places with changes to the system properties in between, leading to different filenames.
@c00ler
c00ler deleted the fix/reuse-run-statistics-file branch March 19, 2026 07:41
olamy pushed a commit to olamy/maven-surefire that referenced this pull request Mar 19, 2026
…3326)

The issue is that `getStatisticsFile()` uses `getConfigChecksum()` which relies on potentially mutable values such as system properties, provider properties, etc. `getStatisticsFile()` was called from different places with changes to the system properties in between, leading to different filenames.
olamy added a commit that referenced this pull request Mar 23, 2026
…3327)

The issue is that `getStatisticsFile()` uses `getConfigChecksum()` which relies on potentially mutable values such as system properties, provider properties, etc. `getStatisticsFile()` was called from different places with changes to the system properties in between, leading to different filenames.

Co-authored-by: Alexey Venderov <avenderov@gradle.com>
@olamy olamy mentioned this pull request Oct 3, 2026
2 tasks
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.

2 participants