Manno15 commented on a change in pull request #2097:
URL: https://github.com/apache/accumulo/pull/2097#discussion_r631220510
##########
File path: test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
##########
@@ -1431,18 +1436,20 @@ public void help() throws Exception {
}
}
- // TODO - evaluate this test is testing what is expected or history is
working.
@Test
public void history() throws Exception {
- final String table = name.getMethodName();
+ final String table = getUniqueNames(1)[0];
- ts.exec("history -c", true);
- ts.exec("createtable " + table);
- ts.exec("deletetable -f " + table);
- // TODO - this may be passing only because method name is history.
+ // test clear history command works
+ ts.writeToHistory("foo");
+ ts.exec("history -c", true, "foo", false);
+
+ // write to history file. Does not execute functions
+ ts.writeToHistory("createtable " + table);
+ ts.writeToHistory("deletetable -f " + table);
+
+ // test that history command prints contents of history file
ts.exec("history", true, table, true);
- // TODO - what is this testing?
- ts.exec("history", true, "history", true);
Review comment:
In a previous iteration, I kept this line but replaced the expected
string with "foo". That is now being used in the validity check so I removed it
here. The rest of what you said is still true and with your additions above, I
believe the history command is thoroughly tested.
--
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:
[email protected]