From fb00d504485223e86f6f8e07ef7e55c25aa6b245 Mon Sep 17 00:00:00 2001 From: Dave Marion Date: Thu, 9 Jul 2026 16:38:04 +0000 Subject: [PATCH] Fix numFiles check in GracefulShutdownIT GracefulShutdownIT was periodically failing when checking if the number of files in the table was lower than before a compaction occurred. This check was happening too quickly and not allowing for the coordinator to notify the tablet server to commit the compaction. Changed the logic to wait for the condition instead of checking it once. --- .../apache/accumulo/test/functional/GracefulShutdownIT.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/src/main/java/org/apache/accumulo/test/functional/GracefulShutdownIT.java b/test/src/main/java/org/apache/accumulo/test/functional/GracefulShutdownIT.java index cbdb01b2f20..e98a3a1d1be 100644 --- a/test/src/main/java/org/apache/accumulo/test/functional/GracefulShutdownIT.java +++ b/test/src/main/java/org/apache/accumulo/test/functional/GracefulShutdownIT.java @@ -232,9 +232,8 @@ public void testGracefulShutdown() throws Exception { control.refreshProcesses(ServerType.COMPACTOR); return control.getProcesses(ServerType.COMPACTOR).isEmpty(); }); - final long numFiles3 = getNumFilesForTable(ctx, tid); - assertTrue(numFiles3 < numFiles2); - assertEquals(1, numFiles3); + Wait.waitFor(() -> getNumFilesForTable(ctx, tid) < numFiles2); + assertEquals(1, getNumFilesForTable(ctx, tid)); getCluster().getConfig().setNumScanServers(1); control.startScanServer(ScanServer.class, 1, GROUP_NAME);