Mmuzaf commented on code in PR #3752:
URL: https://github.com/apache/cassandra/pull/3752#discussion_r1913697921


##########
test/distributed/org/apache/cassandra/distributed/test/SnapshotsTest.java:
##########
@@ -397,6 +397,49 @@ public void 
testTakingSnapshoWithSameNameOnDifferentTablesDoesNotFail()
         cluster.get(1).nodetoolResult("snapshot", "-t", "somename", "-kt", 
String.format("%s.tbl2", KEYSPACE)).asserts().success();
     }
 
+    @Test
+    public void testListingOfSnapshotsByKeyspaceAndTable()
+    {
+        IInvokableInstance instance = cluster.get(1);
+        cluster.schemaChange("CREATE KEYSPACE IF NOT EXISTS ks1 WITH 
replication = {'class': 'SimpleStrategy', 'replication_factor': 1};");
+        cluster.schemaChange("CREATE KEYSPACE IF NOT EXISTS ks2 WITH 
replication = {'class': 'SimpleStrategy', 'replication_factor': 1};");
+        cluster.schemaChange("CREATE TABLE IF NOT EXISTS ks1.tbl (key int, 
value text, PRIMARY KEY (key))");
+        cluster.schemaChange("CREATE TABLE IF NOT EXISTS ks1.tbl2 (key int, 
value text, PRIMARY KEY (key))");
+        cluster.schemaChange("CREATE TABLE IF NOT EXISTS ks2.tbl (key int, 
value text, PRIMARY KEY (key))");
+        cluster.schemaChange("CREATE TABLE IF NOT EXISTS ks2.tbl2 (key int, 
value text, PRIMARY KEY (key))");
+
+        populate(cluster, "ks1", "tbl");
+        populate(cluster, "ks1", "tbl2");
+        populate(cluster, "ks2", "tbl");
+        populate(cluster, "ks2", "tbl2");
+
+        instance.nodetoolResult("snapshot", "-t", "tagks1tbl", "-kt", 
"ks1.tbl").asserts().success();

Review Comment:
   As far as I understand, the `-kt` option is simply ignored as it doesn't 
have the right handler, so why do we need to test it? From a POSIX perspective, 
only boolean options could be stacked in this way, so I would avoid using it in 
this way.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to