You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2018/07/04 15:57:54 UTC

[22/41] qpid-proton git commit: NO-JIRA: [c] example_test skip SSL tests if SSL not available.

NO-JIRA: [c] example_test skip SSL tests if SSL not available.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/863825cf
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/863825cf
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/863825cf

Branch: refs/heads/go1
Commit: 863825cf39bb3ad1452f3bf0faa3b9326a799aa4
Parents: 13e605c
Author: Alan Conway <ac...@redhat.com>
Authored: Wed Jun 13 08:43:33 2018 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Wed Jun 13 08:50:05 2018 -0400

----------------------------------------------------------------------
 c/examples/example_test.py | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/863825cf/c/examples/example_test.py
----------------------------------------------------------------------
diff --git a/c/examples/example_test.py b/c/examples/example_test.py
index b6a5a4a..25a089b 100644
--- a/c/examples/example_test.py
+++ b/c/examples/example_test.py
@@ -114,12 +114,18 @@ class CExampleTest(ProcTestCase):
         self.assertMultiLineEqual(expect, d.wait_exit())
 
     def test_send_ssl_receive(self):
-        """Send first then receive"""
-        with Broker(self) as b:
-            got = self.runex("send-ssl", b.port)
-            self.assertIn("secure connection:", got)
-            self.assertIn(send_expect(), got)
-            self.assertMultiLineEqual(receive_expect(), self.runex("receive", b.port))
+        """Send with SSL, then receive"""
+        try:
+            with Broker(self) as b:
+                got = self.runex("send-ssl", b.port)
+                self.assertIn("secure connection:", got)
+                self.assertIn(send_expect(), got)
+                self.assertMultiLineEqual(receive_expect(), self.runex("receive", b.port))
+        except ProcError as e:
+            if e.out.startswith("error initializing SSL"):
+                print("Skipping %s: SSL not available" % self.id())
+            else:
+                raise
 
 if __name__ == "__main__":
     unittest.main()


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