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

brandonwilliams 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 7ae0fce  Don't fail all view filtering tests because one method timed 
out
7ae0fce is described below

commit 7ae0fcecd207af14e35d171642b8d21feb6e543a
Author: jacek-lewandowski <[email protected]>
AuthorDate: Thu Mar 11 21:02:05 2021 +0100

    Don't fail all view filtering tests because one method timed out
    
    Patch by Jacek Lewandowski; reviewed by brandonwilliams for
    CASSANDRA-16515
---
 .../org/apache/cassandra/cql3/ViewFilteringTest.java   | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/test/unit/org/apache/cassandra/cql3/ViewFilteringTest.java 
b/test/unit/org/apache/cassandra/cql3/ViewFilteringTest.java
index 46488af..bc52321 100644
--- a/test/unit/org/apache/cassandra/cql3/ViewFilteringTest.java
+++ b/test/unit/org/apache/cassandra/cql3/ViewFilteringTest.java
@@ -30,6 +30,7 @@ import org.junit.Test;
 import com.datastax.driver.core.exceptions.InvalidQueryException;
 import org.junit.Assert;
 
+import com.datastax.driver.core.exceptions.OperationTimedOutException;
 import org.apache.cassandra.concurrent.SEPExecutor;
 import org.apache.cassandra.concurrent.Stage;
 import org.apache.cassandra.db.Keyspace;
@@ -70,10 +71,19 @@ public class ViewFilteringTest extends CQLTester
 
     private void createView(String name, String query) throws Throwable
     {
-        executeNet(protocolVersion, String.format(query, name));
-        // If exception is thrown, the view will not be added to the list; 
since it shouldn't have been created, this is
-        // the desired behavior
-        views.add(name);
+        try
+        {
+            executeNet(protocolVersion, String.format(query, name));
+            // If exception is thrown, the view will not be added to the list; 
since it shouldn't have been created, this is
+            // the desired behavior
+            views.add(name);
+        }
+        catch (OperationTimedOutException ex)
+        {
+            // ... except for timeout, when we actually do not know whether 
the view was created or not
+            views.add(name);
+            throw ex;
+        }
     }
 
     private void updateView(String query, Object... params) throws Throwable


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

Reply via email to