5454import org .junit .jupiter .api .AfterEach ;
5555import org .junit .jupiter .api .BeforeAll ;
5656import org .junit .jupiter .api .BeforeEach ;
57+ import org .junit .jupiter .api .RepeatedTest ;
5758import org .junit .jupiter .api .condition .EnabledIfEnvironmentVariable ;
5859import org .junit .jupiter .params .ParameterizedTest ;
5960import 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