You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by be...@apache.org on 2022/05/19 08:05:46 UTC

[cassandra] branch cassandra-4.0 updated: Flaky org.apache.cassandra.tools TopPartitionsTest testServiceTopPartitionsSingleTable

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

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


The following commit(s) were added to refs/heads/cassandra-4.0 by this push:
     new af24242af9 Flaky org.apache.cassandra.tools TopPartitionsTest testServiceTopPartitionsSingleTable
af24242af9 is described below

commit af24242af913b63b29691251025d2aa54e3890bd
Author: Bereng <be...@gmail.com>
AuthorDate: Thu May 12 11:06:13 2022 +0200

    Flaky org.apache.cassandra.tools TopPartitionsTest testServiceTopPartitionsSingleTable
    
    patch by Berenguer Blasi; reviewed by Brandon Williams for CASSANDRA-17455
---
 .../apache/cassandra/tools/TopPartitionsTest.java    | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/test/unit/org/apache/cassandra/tools/TopPartitionsTest.java b/test/unit/org/apache/cassandra/tools/TopPartitionsTest.java
index caa46ea7d0..975ad15776 100644
--- a/test/unit/org/apache/cassandra/tools/TopPartitionsTest.java
+++ b/test/unit/org/apache/cassandra/tools/TopPartitionsTest.java
@@ -18,10 +18,6 @@
 
 package org.apache.cassandra.tools;
 
-import static java.lang.String.format;
-import static org.apache.cassandra.cql3.QueryProcessor.executeInternal;
-import static org.junit.Assert.assertEquals;
-
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ArrayBlockingQueue;
@@ -30,17 +26,21 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 
 import javax.management.openmbean.CompositeData;
-import javax.management.openmbean.TabularDataSupport;
+
+import com.google.common.collect.Lists;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
 
 import org.apache.cassandra.SchemaLoader;
 import org.apache.cassandra.db.ColumnFamilyStore;
 import org.apache.cassandra.db.SystemKeyspace;
 import org.apache.cassandra.exceptions.ConfigurationException;
 import org.apache.cassandra.service.StorageService;
-import org.junit.BeforeClass;
-import org.junit.Test;
 
-import com.google.common.collect.Lists;
+import static java.lang.String.format;
+import static org.apache.cassandra.cql3.QueryProcessor.executeInternal;
+import static org.junit.Assert.assertEquals;
 
 public class TopPartitionsTest
 {
@@ -76,10 +76,10 @@ public class TopPartitionsTest
     @Test
     public void testServiceTopPartitionsSingleTable() throws Exception
     {
-        ColumnFamilyStore.getIfExists("system", "local").beginLocalSampling("READS", 5, 100000);
+        ColumnFamilyStore.getIfExists("system", "local").beginLocalSampling("READS", 5, 240000);
         String req = "SELECT * FROM system.%s WHERE key='%s'";
         executeInternal(format(req, SystemKeyspace.LOCAL, SystemKeyspace.LOCAL));
         List<CompositeData> result = ColumnFamilyStore.getIfExists("system", "local").finishLocalSampling("READS", 5);
-        assertEquals(1, result.size());
+        assertEquals("If this failed you probably have to raise the beginLocalSampling duration", 1, result.size());
     }
 }


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