This is an automated email from the ASF dual-hosted git repository.
brandonwilliams 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 3b2dd9f9dc allow more than one sstable in testIgnoreUpdate
3b2dd9f9dc is described below
commit 3b2dd9f9dc2ef9d0b853628f0882e8d8934b2bdd
Author: Brandon Williams <[email protected]>
AuthorDate: Tue Aug 15 09:24:58 2023 -0500
allow more than one sstable in testIgnoreUpdate
Patch by brandonwilliams; reviewed by adelapena for CASSANDRA-18706
---
test/unit/org/apache/cassandra/cql3/ViewTest.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/test/unit/org/apache/cassandra/cql3/ViewTest.java
b/test/unit/org/apache/cassandra/cql3/ViewTest.java
index a2793fd9fb..fa98a2f3be 100644
--- a/test/unit/org/apache/cassandra/cql3/ViewTest.java
+++ b/test/unit/org/apache/cassandra/cql3/ViewTest.java
@@ -19,6 +19,7 @@
package org.apache.cassandra.cql3;
import java.util.List;
+import java.util.Set;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Future;
@@ -36,6 +37,7 @@ import org.apache.cassandra.db.compaction.CompactionManager;
import org.apache.cassandra.db.view.View;
import org.apache.cassandra.exceptions.InvalidRequestException;
import org.apache.cassandra.exceptions.SyntaxException;
+import org.apache.cassandra.io.sstable.format.SSTableReader;
import org.apache.cassandra.schema.SchemaConstants;
import org.apache.cassandra.schema.SchemaKeyspaceTables;
import org.apache.cassandra.service.ClientWarn;
@@ -325,7 +327,9 @@ public class ViewTest extends ViewAbstractTest
ColumnFamilyStore cfs =
Keyspace.open(keyspace()).getColumnFamilyStore(currentView());
Util.flush(cfs);
- Assert.assertEquals(1, cfs.getLiveSSTables().size());
+ Set<SSTableReader> tables = cfs.getLiveSSTables();
+ // cf may have flushed due to the commit log being dirty, plus our
explicit flush above
+ Assert.assertTrue(String.format("Expected one or two sstables, got
%s", tables), tables.size() > 0 && tables.size() <= 2);
}
@Test
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]