Commit d58a480
committed
Fix flaky OpenSearchTestBasePluginFuncTest (#20955)
When integTest runs with maxParallelForks > 1, all parallel test JVMs
share the same default .gradle-test-kit directory. This causes a race
condition in Gradle 9.4 where concurrent tests simultaneously read and
write the Groovy DSL compiled script cache (cp_settings), resulting in
a NoSuchFileException and UnexpectedBuildFailure.
Fix by assigning each test method its own isolated TestKit directory
via withTestKitDir() using a subdirectory within the already-unique
TemporaryFolder. This eliminates cross-test cache contention while
preserving daemon and task history reuse within the same test method
(required for UP_TO_DATE assertions).
Signed-off-by: Dharmesh <dharmesh.singh@uber.com>1 parent fb5d661 commit d58a480
File tree
1 file changed
+3
-0
lines changed- buildSrc/src/integTest/groovy/org/opensearch/gradle/fixtures
1 file changed
+3
-0
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| 67 | + | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
| |||
0 commit comments