jayalakshmi-sasidharan opened a new pull request, #584:
URL: https://github.com/apache/maven-build-cache-extension/pull/584

   ## Summary
   
   Fixes #537.
   
   Integration tests that rely on Maven Build Cache's default location can 
share cache state across test runs, leading to unexpected cache hits and test 
interference.
   
   This PR configures a test-specific build-cache directory by default, while 
allowing tests that explicitly manage their own cache locations to opt out.
   
   ## Changes
   
   - Configure `IntegrationTestExtension` to pass 
`-Dmaven.build.cache.location` using a directory specific to each integration 
test.
   - Add `isolateBuildCache` to the `@IntegrationTest` annotation, enabled by 
default.
   - Remove shared `target/build-cache` cleanup that is no longer needed.
   - Update existing tests to use their isolated cache directories and preserve 
the cache-location property when resetting CLI options.
   - Allow tests with explicitly configured cache directories to opt out of 
automatic isolation.
   - Add a regression assertion in `IncrementalRestoreTest` to verify that 
build metadata is written to the test-specific cache directory.
   
   ## Validation
   
   The regression assertion in `IncrementalRestoreTest` failed before the fix 
and passed after the implementation.
   
   - `mvn verify -Prun-its-smoke` — 123 tests, 0 failures, 0 errors, 0 skipped.
   - `mvn verify -Prun-its` — 355 tests, 0 failures, 0 errors, 5 skipped.
   - `git diff --check` — passed.
   
   The Docker-dependent tests were skipped in the local environment.
   
   To make clear that you license your contribution under
   the [Apache License Version 2.0, January 
2004](https://www.apache.org/licenses/LICENSE-2.0)
   check one of the following:
   
   - [x] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0)
   - [ ] I hereby declare that I have filed an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to