This is an automated email from the ASF dual-hosted git repository. marcuse pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/trunk by this push: new 1ce58ac Wait for compactions to finish in PendingAntiCompactionBytemanTest 1ce58ac is described below commit 1ce58ac2ea945baaaeece233f3d3735686a2ecb8 Author: Marcus Eriksson <marc...@apache.org> AuthorDate: Mon Mar 2 15:19:31 2020 +0100 Wait for compactions to finish in PendingAntiCompactionBytemanTest Patch by marcuse; reviewed by David Capwell for CASSANDRA-15552 --- .../apache/cassandra/db/repair/PendingAntiCompactionBytemanTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/unit/org/apache/cassandra/db/repair/PendingAntiCompactionBytemanTest.java b/test/unit/org/apache/cassandra/db/repair/PendingAntiCompactionBytemanTest.java index 9271866..127a0a4 100644 --- a/test/unit/org/apache/cassandra/db/repair/PendingAntiCompactionBytemanTest.java +++ b/test/unit/org/apache/cassandra/db/repair/PendingAntiCompactionBytemanTest.java @@ -30,6 +30,7 @@ import com.google.common.collect.Lists; import org.junit.Test; import org.junit.runner.RunWith; import org.apache.cassandra.db.compaction.CompactionInterruptedException; +import org.apache.cassandra.db.compaction.CompactionManager; import org.apache.cassandra.dht.Range; import org.apache.cassandra.dht.Token; import org.apache.cassandra.io.sstable.format.SSTableReader; @@ -75,6 +76,9 @@ public class PendingAntiCompactionBytemanTest extends AbstractPendingAntiCompact { assertTrue(e.getCause() instanceof CompactionInterruptedException); } + // Note that since we fail the PAC immediately when any of the anticompactions fail we need to wait for the other + // AC to finish as well before asserting that we have nothing compacting. + CompactionManager.instance.waitForCessation(Lists.newArrayList(cfs, cfs2), (sstable) -> true); // and make sure nothing is marked compacting assertTrue(cfs.getTracker().getCompacting().isEmpty()); assertTrue(cfs2.getTracker().getCompacting().isEmpty()); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org