DomGarguilo commented on code in PR #6069:
URL: https://github.com/apache/accumulo/pull/6069#discussion_r2733132038
##########
test/src/main/java/org/apache/accumulo/test/shell/ShellServerIT.java:
##########
@@ -2385,6 +2391,38 @@ public void testListTablets() throws Exception {
assertTrue(
results.contains(tableId2 + " t +INF
ONDEMAND"));
+ String filtered = ts.exec("listtablets -np -t " + table1 + " -b h -e t",
true);
+ assertTrue(
+ filtered.contains(tableId1 + " g n
ONDEMAND"));
+ assertTrue(
+ filtered.contains(tableId1 + " n u
HOSTED"));
+ assertFalse(filtered.contains(tableId1 + " -INF g"));
+ assertFalse(filtered.contains(tableId1 + " u
+INF"));
+
+ filtered = ts.exec("listtablets -np -t " + table1 + " -b n", true);
+ assertFalse(filtered.contains(tableId1 + " -INF g"));
+ assertTrue(
+ filtered.contains(tableId1 + " g n
ONDEMAND"));
+ assertTrue(
+ filtered.contains(tableId1 + " n u
HOSTED"));
+ assertTrue(
+ filtered.contains(tableId1 + " u +INF
ONDEMAND"));
+
+ filtered = ts.exec("listtablets -np -t " + table1 + " -e n", true);
+ assertTrue(
+ filtered.contains(tableId1 + " -INF g
HOSTED"));
+ assertTrue(
+ filtered.contains(tableId1 + " g n
ONDEMAND"));
+ assertFalse(
+ filtered.contains(tableId1 + " n u
HOSTED"));
Review Comment:
Yea these tests that compare against a shell output string are pretty ugly
and hard to read. Might be a way to improve things for all tests like this.
--
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]