ACCUMULO-3986 Eat some common warning messages on simple.recoverWithEmpty.RecoverWithEmptyTest
This should make the tests a little easier to run successfully. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/c6aae57a Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/c6aae57a Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/c6aae57a Branch: refs/heads/1.6 Commit: c6aae57a44eefeba05a3569d2bb08fadecd11275 Parents: c18fe9e Author: Josh Elser <[email protected]> Authored: Tue Sep 1 23:24:26 2015 -0400 Committer: Josh Elser <[email protected]> Committed: Tue Sep 1 23:24:26 2015 -0400 ---------------------------------------------------------------------- test/system/auto/simple/recoverWithEmpty.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/c6aae57a/test/system/auto/simple/recoverWithEmpty.py ---------------------------------------------------------------------- diff --git a/test/system/auto/simple/recoverWithEmpty.py b/test/system/auto/simple/recoverWithEmpty.py index 18ac055..b5b1253 100755 --- a/test/system/auto/simple/recoverWithEmpty.py +++ b/test/system/auto/simple/recoverWithEmpty.py @@ -95,7 +95,13 @@ class RecoverWithEmptyTest(unittest.TestCase, TestUtilsMixin): out,err,code = self.shell(self.masterHost(), 'online -t test_ingest\n') self.processResult(out,err,code); out,err = self.waitForStop(self.runOn(self.masterHost(), [self.accumulo_sh(), 'shell', '-u', ROOT, '-p', ROOT_PASSWORD, '-e', 'scan -t test_ingest']), waitTime) - self.failUnless(len(out) == 0) + lines = out.strip().split('\n') + # Poor man's grep -v + if len(lines) > 0: + # Avoid failing the test if we have some log4j warnings + if 'util.NativeCodeLoader' in lines[0]: + lines = lines[1:] + self.failUnless(len(lines) == 0, "Expected no output, saw '" + out + "'") self.shutdown_accumulo() def suite():
