SLIDER-460: check both stderr and stdout for strings
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/d6ff425c Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/d6ff425c Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/d6ff425c Branch: refs/heads/develop Commit: d6ff425c521b1e5a3306a0973038f0350e0d1d6f Parents: 94c6060 Author: Steve Loughran <ste...@apache.org> Authored: Tue Oct 21 14:49:31 2014 +0100 Committer: Steve Loughran <ste...@apache.org> Committed: Tue Oct 21 14:49:31 2014 +0100 ---------------------------------------------------------------------- .../slider/funtest/framework/AgentCommandTestBase.groovy | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/d6ff425c/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentCommandTestBase.groovy ---------------------------------------------------------------------- diff --git a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentCommandTestBase.groovy b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentCommandTestBase.groovy index db9fa6d..69523aa 100644 --- a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentCommandTestBase.groovy +++ b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/AgentCommandTestBase.groovy @@ -151,7 +151,9 @@ implements FuntestProperties, Arguments, SliderExitCodes, SliderActions { public static String findLineEntry(SliderShell shell, String[] locaters) { int index = 0; - for (String str in shell.out) { + def output = shell.out + output += shell.err + for (String str in output) { if (str.contains("\"" + locaters[index] + "\"")) { if (locaters.size() == index + 1) { return str; @@ -166,7 +168,9 @@ implements FuntestProperties, Arguments, SliderExitCodes, SliderActions { public static boolean containsString(SliderShell shell, String lookThisUp, int n = 1) { int count = 0 - for (String str in shell.out) { + def output = shell.out + output += shell.err + for (String str in output) { int subCount = countString(str, lookThisUp) count = count + subCount if (count == n) {