Repository navigation
Conversation
… other's temp directories
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What changes were proposed in this pull request?
Why are the changes needed?
Compactor tests that extend CompactorTest can fail depending on which other test classes ran before them in the same Maven run. For example, TestWorker2#minorNoBaseLotsOfDeltas fails with:
if it runs after TestCompactionMetrics#testWorkerPerfMetrics in the same split.
How to reproduce:
mvn -pl ql test -Dtest='TestCompactionMetrics#testWorkerPerfMetrics,TestWorker2#minorNoBaseLotsOfDeltas' -Dsurefire.runOrder=alphabeticalCause
CompactorTest.setup() creates each test's directory as ${test.tmp.dir}/compactor_test_table_, where N comes from a static AtomicInteger. Surefire runs each test class in a new JVM (reuseForks=false), so N starts at 0 in every class. ql/target/tmp is only cleaned once per Maven run, so tests in different classes get the same directory.
TestCompactionMetrics never calls compactorTestCleanup(), so its files stay behind. When a later test reuses that directory and the same table name (mapwb), it finds old base and delta directories. The compactor then marks some deltas as obsolete, and the test's file count assertions fail.
Does this PR introduce any user-facing change?
No, it is just unit test fix
How was this patch tested?
By running the unit tests