cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [cassandra] codacy-bot commented on a change in pull request #361: Expose schema via new DESCRIBE CQL statement
Date Mon, 07 Oct 2019 12:23:35 GMT
codacy-bot commented on a change in pull request #361: Expose schema via new DESCRIBE CQL statement
URL: https://github.com/apache/cassandra/pull/361#discussion_r331987513
 
 

 ##########
 File path: test/unit/org/apache/cassandra/utils/FBUtilitiesTest.java
 ##########
 @@ -216,4 +220,34 @@ public void testWaitFirstFuture() throws ExecutionException, InterruptedExceptio
         assertEquals(futSleep, 40);
     }
 
+    @Test
+    public void testColumnize()
+    {
+        List<String> res;
+
+        res = FBUtilities.columnize(Stream.of("12345"), 20)
+                         .collect(Collectors.toList());
+        Assert.assertEquals(Collections.singletonList("12345"), res);
+
+        res = FBUtilities.columnize(Stream.of("aaaaa", "bbbbb", "ccccc", "ddddd"), 20)
+                         .collect(Collectors.toList());
+        Assert.assertEquals(Arrays.asList("aaaaa  ccccc", "bbbbb  ddddd"), res);
+
+        res = FBUtilities.columnize(Stream.of("aaaaa", "bbbbb", "ccccc", "ddddd", "eeeee"),
20)
+                         .collect(Collectors.toList());
+        Assert.assertEquals(Arrays.asList("aaaaa  ccccc  eeeee", "bbbbb  ddddd"), res);
+
+        res = FBUtilities.columnize(Stream.of("aaaaa", "bbbbb", "ccccccccccccc", "ddddd"),
20)
+                         .collect(Collectors.toList());
+        Assert.assertEquals(Arrays.asList("aaaaa  ccccccccccccc", "bbbbb  ddddd"), res);
+
+        res = FBUtilities.columnize(Stream.of("aaaaa", "bbbbb", "cccccccccccccccccccc", "ddddd"),
20)
+                         .collect(Collectors.toList());
+        Assert.assertEquals(Arrays.asList("aaaaa", "bbbbb", "cccccccccccccccccccc", "ddddd"),
res);
 
 Review comment:
   ![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: [Unnecessary use
of fully qualified name 'Assert.assertEquals' due to existing static import 'org.junit.Assert.assertEquals'](https://app.codacy.com/app/Wen1234/cassandra/pullRequest?prid=4274613)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


Mime
View raw message