qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject [qpid-dispatch] branch master updated: DISPATCH-1676: PolicyWarnings test process shutdown issue
Date Thu, 11 Jun 2020 19:27:09 GMT
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 9f96ed8  DISPATCH-1676: PolicyWarnings test process shutdown issue
9f96ed8 is described below

commit 9f96ed8234c59b2f599e9f82665585ed828ce8aa
Author: Chuck Rolke <chug@apache.org>
AuthorDate: Thu Jun 11 15:20:33 2020 -0400

    DISPATCH-1676: PolicyWarnings test process shutdown issue
    
    This test start and stops a router so quickly that it exposes process
    handling issues in the test framework. That problem has nothing to do
    with Policy.
    
    The test was written originally to prove that python Policy code could
    write log warnings withtout crashing the router. That issue was fixed
    long ago.
---
 tests/system_tests_policy.py | 30 ------------------------------
 1 file changed, 30 deletions(-)

diff --git a/tests/system_tests_policy.py b/tests/system_tests_policy.py
index e55eda4..d3d14eb 100644
--- a/tests/system_tests_policy.py
+++ b/tests/system_tests_policy.py
@@ -760,36 +760,6 @@ class VhostPolicyNameField(TestCase):
         self.assertFalse(isoFound)
 
 
-class PolicyWarnings(TestCase):
-    """
-    Verify that specifying a policy that generates a warning does
-    not cause the router to exit without showing the warning.
-    """
-    @classmethod
-    def setUpClass(cls):
-        """Start the router"""
-        super(PolicyWarnings, cls).setUpClass()
-        listen_port = cls.tester.get_port()
-        policy_config_path = os.path.join(DIR, 'policy-6')
-        config = Qdrouterd.Config([
-            ('router', {'mode': 'standalone', 'id': 'QDR.Policy'}),
-            ('listener', {'port': listen_port}),
-            ('policy', {'maxConnections': 2, 'policyDir': policy_config_path, 'enableVhostPolicy':
'true'})
-        ])
-
-        cls.router = cls.tester.qdrouterd('PolicyWarnings', config, wait=False)
-        try:
-            cls.router.wait_ready(timeout = 5)
-        except Exception as e:
-            pass
-
-    def test_03_policy_warnings(self):
-        with  open('../setUpClass/PolicyWarnings.log', 'r') as router_log:
-            log_lines = router_log.read().split("\n")
-            critical_lines = [s for s in log_lines if "'PolicyManager' object has no attribute
'log_warning'" in s]
-            self.assertTrue(len(critical_lines) == 0, msg='Policy manager does not forward
policy warnings and shuts down instead.')
-
-
 class PolicyLinkNamePatternTest(TestCase):
     """
     Verify that specifying a policy that generates a warning does


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


Mime
View raw message