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

maedhroz 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 e22f67a2f7 Make sure 
IntersectFilteringQueryTest#shouldNotWarnOrFailOnIndexQuery waits for indexes 
to be available before making queries
e22f67a2f7 is described below

commit e22f67a2f7815f06190e78e7859e74d0769e4cc9
Author: Caleb Rackliffe <calebrackli...@gmail.com>
AuthorDate: Thu May 2 09:48:41 2024 -0500

    Make sure IntersectFilteringQueryTest#shouldNotWarnOrFailOnIndexQuery waits 
for indexes to be available before making queries
    
    patch by Caleb Rackliffe; reviewed by Brandon Williams for CASSANDRA-19612
---
 .../test/guardrails/IntersectFilteringQueryTest.java           | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git 
a/test/distributed/org/apache/cassandra/distributed/test/guardrails/IntersectFilteringQueryTest.java
 
b/test/distributed/org/apache/cassandra/distributed/test/guardrails/IntersectFilteringQueryTest.java
index aa6f8876e6..cbf0f42fe5 100644
--- 
a/test/distributed/org/apache/cassandra/distributed/test/guardrails/IntersectFilteringQueryTest.java
+++ 
b/test/distributed/org/apache/cassandra/distributed/test/guardrails/IntersectFilteringQueryTest.java
@@ -29,12 +29,16 @@ import com.datastax.driver.core.Session;
 import com.datastax.driver.core.exceptions.InvalidQueryException;
 import org.apache.cassandra.db.guardrails.Guardrails;
 import org.apache.cassandra.distributed.Cluster;
-import org.apache.cassandra.distributed.api.Feature;
 import org.apache.cassandra.distributed.api.IIsolatedExecutor;
+import org.apache.cassandra.distributed.test.sai.SAIUtil;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 
+import static org.apache.cassandra.distributed.api.Feature.GOSSIP;
+import static org.apache.cassandra.distributed.api.Feature.NATIVE_PROTOCOL;
+import static org.apache.cassandra.distributed.api.Feature.NETWORK;
+
 public class IntersectFilteringQueryTest extends GuardrailTester
 {
     private static Cluster cluster;
@@ -44,7 +48,7 @@ public class IntersectFilteringQueryTest extends 
GuardrailTester
     @BeforeClass
     public static void setupCluster() throws IOException
     {
-        cluster = init(Cluster.build(2).withConfig(c -> c.with(Feature.GOSSIP, 
Feature.NATIVE_PROTOCOL)
+        cluster = init(Cluster.build(2).withConfig(c -> c.with(GOSSIP, 
NATIVE_PROTOCOL, NETWORK)
                                                          
.set("read_thresholds_enabled", "true")
                                                          .set("authenticator", 
"PasswordAuthenticator")).start());
 
@@ -112,6 +116,8 @@ public class IntersectFilteringQueryTest extends 
GuardrailTester
         schemaChange("CREATE TABLE %s (k bigint, c bigint, v1 bigint, v2 
bigint, PRIMARY KEY (k, c))");
         schemaChange("CREATE INDEX ON %s(v1) USING 'sai'");
         schemaChange("CREATE INDEX ON %s(v2) USING 'sai'");
+        SAIUtil.waitForIndexQueryable(getCluster(), KEYSPACE);
+
         List<String> globalWarnings = executeViaDriver(format("SELECT * FROM 
%s WHERE v1 = 0 AND v2 = 0"));
         assertThat(globalWarnings).isEmpty();
         List<String> partitionWarnings = executeViaDriver(format("SELECT * 
FROM %s WHERE k = 0 AND v1 = 0 AND v2 = 0"));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to