You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ch...@apache.org on 2020/03/18 20:14:06 UTC

[qpid-dispatch] branch master updated: NO-JIRA: bad_configuration test: Print output when AttributeError is absent

This is an automated email from the ASF dual-hosted git repository.

chug pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/master by this push:
     new be20af0  NO-JIRA: bad_configuration test: Print output when AttributeError is absent
be20af0 is described below

commit be20af015b91be71a428b3ebe79b2191c2f7b4e2
Author: Chuck Rolke <ch...@apache.org>
AuthorDate: Wed Mar 18 16:07:34 2020 -0400

    NO-JIRA: bad_configuration test: Print output when AttributeError is absent
    
    Asserting that the error is absent is true but not very helpful
    for debug purposes.
    
    Printing the output on test failure  may expose environment issues
    that have nothing to do with router and the config file processing
    but are causing the test to fail.
---
 tests/system_tests_bad_configuration.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/system_tests_bad_configuration.py b/tests/system_tests_bad_configuration.py
index 32a24fc..aa564ed 100644
--- a/tests/system_tests_bad_configuration.py
+++ b/tests/system_tests_bad_configuration.py
@@ -198,7 +198,9 @@ class RouterTestIdFailCtrlChar(TestCase):
             p.teardown()
         except Exception as e:
             raise Exception("%s\n%s" % (e, out))
-        self.assertTrue("AttributeError" in out)
+        if "AttributeError" not in out:
+            print("output: ", out)
+            assert False, "AttributeError not in process output"
 
 class RouterTestIdFailWhiteSpace(TestCase):
     """
@@ -236,4 +238,6 @@ class RouterTestIdFailWhiteSpace(TestCase):
             p.teardown()
         except Exception as e:
             raise Exception("%s\n%s" % (e, out))
-        self.assertTrue("AttributeError" in out)
+        if "AttributeError" not in out:
+            print("output: ", out)
+            assert False, "AttributeError not in process output"


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org