This is an automated email from the ASF dual-hosted git repository. jmark99 pushed a commit to branch elasticity in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/elasticity by this push: new 82bcc5d4b3 Fix bug in testGetHostingGoalCommand test (#3848) 82bcc5d4b3 is described below commit 82bcc5d4b37dea332cafd203f956e3f6b59bb397 Author: Mark Owens <jmar...@apache.org> AuthorDate: Mon Oct 16 13:25:58 2023 -0400 Fix bug in testGetHostingGoalCommand test (#3848) A previous commit had corrected several tests in ShellServerIT where the tests would fail if the tableId was a value other than 1 or 2. The testGetHostingGoalCommand test failed to get that fix. This commit updates that IT tests to handle tableId's of any value. --- .../apache/accumulo/test/shell/ShellServerIT.java | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/test/src/main/java/org/apache/accumulo/test/shell/ShellServerIT.java b/test/src/main/java/org/apache/accumulo/test/shell/ShellServerIT.java index ae640bd7cc..e318fbf9b7 100644 --- a/test/src/main/java/org/apache/accumulo/test/shell/ShellServerIT.java +++ b/test/src/main/java/org/apache/accumulo/test/shell/ShellServerIT.java @@ -1281,29 +1281,29 @@ public class ShellServerIT extends SharedMiniClusterBase { result = ts.exec("gethostinggoal"); assertTrue(result.contains("TABLE: " + tableName)); assertTrue(result.contains("TABLET ID HOSTING GOAL")); - assertTrue(result.contains(tableId + ";d< ONDEMAND")); - assertTrue(result.contains(tableId + ";m;d ONDEMAND")); - assertTrue(result.contains(tableId + ";s;m ONDEMAND")); - assertTrue(result.contains(tableId + "<;s ONDEMAND")); + assertTrue(result.matches("(?s).*" + tableId + ";d<\\s+ONDEMAND.*")); + assertTrue(result.matches("(?s).*" + tableId + ";m;d\\s+ONDEMAND.*")); + assertTrue(result.matches("(?s).*" + tableId + ";s;m\\s+ONDEMAND.*")); + assertTrue(result.matches("(?s).*" + tableId + "<;s\\s+ONDEMAND.*")); ts.exec("sethostinggoal -g ALWAYS -r p"); result = ts.exec("gethostinggoal -r p"); - assertFalse(result.contains(tableId + ";d< ONDEMAND")); - assertFalse(result.contains(tableId + ";m;d ONDEMAND")); - assertTrue(result.contains(tableId + ";s;m ALWAYS")); - assertFalse(result.contains(tableId + "<;s ONDEMAND")); + assertFalse(result.matches("(?s).*" + tableId + ";d<\\s+ONDEMAND.*")); + assertFalse(result.matches("(?s).*" + tableId + ";m;d\\s+ONDEMAND.*")); + assertTrue(result.matches("(?s).*" + tableId + ";s;m\\s+ALWAYS.*")); + assertFalse(result.matches("(?s).*" + tableId + "<;s\\s+ONDEMAND.*")); result = ts.exec("gethostinggoal"); - assertTrue(result.contains(tableId + ";d< ONDEMAND")); - assertTrue(result.contains(tableId + ";m;d ONDEMAND")); - assertTrue(result.contains(tableId + ";s;m ALWAYS")); - assertTrue(result.contains(tableId + "<;s ONDEMAND")); + assertTrue(result.matches("(?s).*" + tableId + ";d<\\s+ONDEMAND.*")); + assertTrue(result.matches("(?s).*" + tableId + ";m;d\\s+ONDEMAND.*")); + assertTrue(result.matches("(?s).*" + tableId + ";s;m\\s+ALWAYS.*")); + assertTrue(result.matches("(?s).*" + tableId + "<;s\\s+ONDEMAND.*")); result = ts.exec("gethostinggoal -b f -e p"); - assertFalse(result.contains(tableId + ";d< ONDEMAND")); - assertTrue(result.contains(tableId + ";m;d ONDEMAND")); - assertTrue(result.contains(tableId + ";s;m ALWAYS")); - assertFalse(result.contains(tableId + "<;s ONDEMAND")); + assertFalse(result.matches("(?s).*" + tableId + ";d<\\s+ONDEMAND.*")); + assertTrue(result.matches("(?s).*" + tableId + ";m;d\\s+ONDEMAND.*")); + assertTrue(result.matches("(?s).*" + tableId + ";s;m\\s+ALWAYS.*")); + assertFalse(result.matches("(?s).*" + tableId + "<;s\\s+ONDEMAND.*")); } finally { if (splitsFilePath != null) {