File tree Expand file tree Collapse file tree 2 files changed +2
-14
lines changed
src/test/java/engineering/swat/watch Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ void deleteOfFileInDirectoryShouldBeVisible() throws IOException {
150150
151151 @ ParameterizedTest
152152 @ EnumSource // Repeat test for each `OnOverflow` value
153- void overflowsAreRecoveredFrom (OnOverflow whichFiles ) throws IOException {
153+ void overflowsAreRecoveredFrom (OnOverflow whichFiles ) throws IOException , InterruptedException {
154154 var parent = testDir .getTestDirectory ();
155155 var descendants = new Path [] {
156156 Path .of ("foo" ),
@@ -215,7 +215,7 @@ void overflowsAreRecoveredFrom(OnOverflow whichFiles) throws IOException {
215215 } else {
216216 // Give the watch some time to process the `OVERFLOW` event and
217217 // do internal bookkeeping
218- TestHelper . trySleep (TestHelper .TINY_WAIT );
218+ Thread . sleep (TestHelper .TINY_WAIT . toMillis () );
219219 }
220220
221221 // Create more files. They *should* be observed (regardless of
Original file line number Diff line number Diff line change @@ -54,16 +54,4 @@ else if (os.contains("win")) {
5454 NORMAL_WAIT = Duration .ofSeconds (4 * delayFactor );
5555 LONG_WAIT = Duration .ofSeconds (8 * delayFactor );
5656 }
57-
58- public static void trySleep (Duration duration ) {
59- trySleep (duration .toMillis ());
60- }
61-
62- public static void trySleep (long millis ) {
63- try {
64- Thread .sleep (millis );
65- } catch (InterruptedException e ) {
66- throw new RuntimeException (e );
67- }
68- }
6957}
You can’t perform that action at this time.
0 commit comments