Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,21 @@ public void testCompactionDurationContinuesAfterCoordinatorStop() throws Excepti
EnumSet.of(IteratorUtil.IteratorScope.majc));

log.info("Compacting table");

// Verify no compactions are running before we start (catch any leftover state from other
// tests)
Map<String,TExternalCompaction> initialCompactions =
getRunningCompactions(getCluster().getServerContext()).getCompactions();
assertTrue(initialCompactions == null || initialCompactions.isEmpty(),
"Expected no running compactions before starting the test");

Comment on lines +144 to +151
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does no harm, but not sure it's needed. The parent class, AccumuloClusterHarness, restarts MiniAccumuloCluster in between each test method (see class javadoc).

compact(client, table, 2, QUEUE1, false);

// Wait until the compaction starts
Wait.waitFor(() -> {
Map<String,TExternalCompaction> compactions =
getRunningCompactions(getCluster().getServerContext()).getCompactions();
return compactions == null || compactions.isEmpty();
return compactions != null && !compactions.isEmpty();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good catch. I can see how this may have originally occurred due to copy/paste content between test methods.

}, 30_000, 100, "Compaction did not start within the expected time");

// start a timer after the compaction starts
Expand Down