netudima commented on code in PR #2497: URL: https://github.com/apache/cassandra/pull/2497#discussion_r2158997921
########## test/unit/org/apache/cassandra/service/StorageServiceDrainTest.java: ########## @@ -86,15 +100,16 @@ public void testSSTablesImportAbort() Executors.newSingleThreadExecutor().execute(() -> { try { - StorageService.instance.drain(); + ToolRunner.invokeNodetoolInJvm("drain").assertOnCleanExit(); } catch (final Exception exception) { throw new RuntimeException(exception); }}); - while (!StorageService.instance.isDraining()) - Thread.yield(); + Awaitility.await() + .atMost(10, TimeUnit.SECONDS) Review Comment: 10 seconds as a timeout for shutdown with disk IO can be too optimistic for CI and cause flakiness.. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org