This is an automated email from the ASF dual-hosted git repository.

bereng pushed a commit to branch cassandra-5.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-5.0 by this push:
     new 25da086336 Test failure: 
org.apache.cassandra.tools.nodetool.ForceCompactionTest.forceCompactMultipleRowsTombstoneTest-.jdk11
25da086336 is described below

commit 25da08633693eef83844ea7591baa3192d18a162
Author: Bereng <[email protected]>
AuthorDate: Wed Sep 27 10:04:40 2023 +0200

    Test failure: 
org.apache.cassandra.tools.nodetool.ForceCompactionTest.forceCompactMultipleRowsTombstoneTest-.jdk11
    
    patch by Berenguer Blasi; reviewed by Brandon Williams for CASSANDRA-18881
---
 .../apache/cassandra/tools/nodetool/ForceCompactionTest.java  | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git 
a/test/unit/org/apache/cassandra/tools/nodetool/ForceCompactionTest.java 
b/test/unit/org/apache/cassandra/tools/nodetool/ForceCompactionTest.java
index 04d369ec6d..ed438b2ca2 100644
--- a/test/unit/org/apache/cassandra/tools/nodetool/ForceCompactionTest.java
+++ b/test/unit/org/apache/cassandra/tools/nodetool/ForceCompactionTest.java
@@ -22,12 +22,14 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 import java.util.Random;
+import java.util.concurrent.TimeUnit;
 
 import org.junit.Before;
 import org.junit.Test;
 
 import static org.junit.Assert.*;
 
+import org.apache.cassandra.Util;
 import org.apache.cassandra.cql3.CQLTester;
 import org.apache.cassandra.db.ColumnFamilyStore;
 import org.apache.cassandra.db.Keyspace;
@@ -237,6 +239,7 @@ public class ForceCompactionTest extends CQLTester
         ColumnFamilyStore cfs = getCurrentColumnFamilyStore();
         if (cfs != null)
         {
+            cfs.forceMajorCompaction();
             cfs.forceCompactionKeysIgnoringGcGrace(partitionKeysIgnoreGcGrace);
         }
     }
@@ -245,11 +248,15 @@ public class ForceCompactionTest extends CQLTester
     {
         // Get sstables
         ColumnFamilyStore cfs = 
Keyspace.open(keyspace()).getColumnFamilyStore(currentTable());
-        Collection<SSTableReader> sstables = cfs.getLiveSSTables();
 
         // always run a major compaction before calling this
-        assertTrue(sstables.size() == 1);
+        Util.spinAssertEquals("Too many sstables: " + 
cfs.getLiveSSTables().toString(),
+                              Boolean.TRUE,
+                              () -> cfs.getLiveSSTables().size() == 1,
+                              60,
+                              TimeUnit.SECONDS);
 
+        Collection<SSTableReader> sstables = cfs.getLiveSSTables();
         SSTableReader sstable = sstables.iterator().next();
         int actualPurgedTombstoneCount = 0;
         try (ISSTableScanner scanner = sstable.getScanner())


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to