You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/03/31 15:13:07 UTC

[GitHub] [cassandra] bbotella commented on a change in pull request #1509: CASSANDRA-17217 Add proper histogram checkup to fix flaky failThresholdSinglePartition

bbotella commented on a change in pull request #1509:
URL: https://github.com/apache/cassandra/pull/1509#discussion_r839729728



##########
File path: test/distributed/org/apache/cassandra/distributed/test/trackwarnings/AbstractClientSizeWarning.java
##########
@@ -283,15 +295,26 @@ public boolean matches(InetAddress value)
         }
         assertHistogramUpdated();
         assertWarnAborts(0, 2, 1);
+    }
+
+    public void failThresholdDisabled(String cql) throws UnknownHostException
+    {
+        ICoordinator node = CLUSTER.coordinator(1);
+        for (int i = 0; i < failThresholdRowCount(); i++)
+            node.execute("INSERT INTO " + KEYSPACE + ".tbl (pk, ck, v) VALUES (1, ?, ?)", ConsistencyLevel.ALL, i + 1, bytes(512));
+
+        if (shouldFlush())
+            CLUSTER.stream().forEach(i -> i.flush(KEYSPACE));
 
         // query should no longer fail
         enable(false);
+        checkpointHistogram();
         SimpleQueryResult result = node.executeWithResult(cql, ConsistencyLevel.ALL);
         assertThat(result.warnings()).isEmpty();
         assertHistogramNotUpdated();

Review comment:
       I didn't want to change current behavior. As you can see in the original test:
   https://github.com/apache/cassandra/blob/trunk/test/distributed/org/apache/cassandra/distributed/test/trackwarnings/AbstractClientSizeWarning.java#L206-L207
   
   It was asserting both things already. Same goes for the failThreshold method:
   https://github.com/apache/cassandra/blob/trunk/test/distributed/org/apache/cassandra/distributed/test/trackwarnings/AbstractClientSizeWarning.java#L290-L291




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org