keith-turner commented on code in PR #3785:
URL: https://github.com/apache/accumulo/pull/3785#discussion_r1341843532


##########
test/src/main/java/org/apache/accumulo/test/shell/ShellServerIT.java:
##########
@@ -1321,51 +1315,61 @@ public void testGetGoalCommand() throws IOException, 
TableNotFoundException {
 
   // Verify that when splits are added after table creation, hosting goals are 
set properly
   @Test
-  public void testGetGoalCommand_DelayedSplits() throws IOException {
+  public void testGetGoalCommand_DelayedSplits() throws Exception {
+
+    for (int i = 0; i < 40; i++) {
+      ts.exec("createtable tab" + i, true);
+    }
 
     final String[] tableName = getUniqueNames(2);
 
     ts.exec("createtable " + tableName[0], true);
+
+    String tableId = getTableId(tableName[0]);
+
     String result = ts.exec("getgoal");
+
     assertTrue(result.contains("TABLE: " + tableName[0]));
     assertTrue(result.contains("TABLET ID    HOSTING GOAL"));
-    assertTrue(result.contains("1<<          ONDEMAND"));
+    assertTrue(result.matches("(?s).*" + tableId + "<<\\s+ONDEMAND.*"));

Review Comment:
   The reason I did pattern matching was because the number of spaces in the 
output would change when the length of the table id changed.  So for a one 
character table id would see more spaces in the output than if there was a two 
digit table id.
   
   As for checking the order, that could be a follow on issue.  It would make 
the test more strict.  The test was not checking the order before these changes.



-- 
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]

Reply via email to