Skip to content

Commit f84f842

Browse files
committed
Remove parameterization from test that has a non-recursive watch
1 parent 634aad3 commit f84f842

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/test/java/engineering/swat/watch/TortureTests.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import org.junit.jupiter.api.AfterEach;
5555
import org.junit.jupiter.api.BeforeAll;
5656
import org.junit.jupiter.api.BeforeEach;
57+
import org.junit.jupiter.api.RepeatedTest;
5758
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
5859
import org.junit.jupiter.params.ParameterizedTest;
5960
import org.junit.jupiter.params.provider.EnumSource;
@@ -209,14 +210,8 @@ void pressureOnFSShouldNotMissNewFilesAnything(OnOverflow whichFiles) throws Int
209210

210211
private final int TORTURE_REGISTRATION_THREADS = THREADS * 500;
211212

212-
static Stream<OnOverflow> manyRegistrationsForSamePathSource() {
213-
OnOverflow[] values = { OnOverflow.ALL, OnOverflow.DIRTY };
214-
return TestHelper.streamOf(values, 5);
215-
}
216-
217-
@ParameterizedTest
218-
@MethodSource("manyRegistrationsForSamePathSource")
219-
void manyRegistrationsForSamePath(OnOverflow whichFiles) throws InterruptedException, IOException {
213+
@RepeatedTest(failureThreshold=1, value = 20)
214+
void manyRegistrationsForSamePath() throws InterruptedException, IOException {
220215
var startRegistering = new Semaphore(0);
221216
var startedWatching = new Semaphore(0);
222217
var startDeregistring = new Semaphore(0);
@@ -229,7 +224,6 @@ void manyRegistrationsForSamePath(OnOverflow whichFiles) throws InterruptedExcep
229224
try {
230225
var watcher = Watcher
231226
.watch(testDir.getTestDirectory(), WatchScope.PATH_AND_CHILDREN)
232-
.approximate(whichFiles)
233227
.on(e -> seen.add(e.calculateFullPath()));
234228
startRegistering.acquire();
235229
try (var c = watcher.start()) {

0 commit comments

Comments
 (0)