From 010b18e0efd2e17e5dded3d8abc347fd1f4c7a0d Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Wed, 9 Mar 2016 09:36:51 +0000 Subject: [PATCH] Task #8887: Fixed pattern matching in t_messagebus to support more qpid installations --- LCS/Messaging/python/messaging/test/t_messagebus.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LCS/Messaging/python/messaging/test/t_messagebus.py b/LCS/Messaging/python/messaging/test/t_messagebus.py index c4a70a0d66d..5f2f2a9af6d 100644 --- a/LCS/Messaging/python/messaging/test/t_messagebus.py +++ b/LCS/Messaging/python/messaging/test/t_messagebus.py @@ -51,7 +51,7 @@ class FromBusInitFailed(unittest.TestCase): Connecting to non-existent broker address must raise MessageBusError """ regexp = re.escape(self.error) - regexp += '.*' + 'No address associated with hostname' + regexp += '.*' + '(No address associated with hostname|Name or service not known)' with self.assertRaisesRegexp(MessageBusError, regexp): with FromBus(QUEUE, broker="foo.bar", broker_options={'reconnect': False}): pass @@ -162,7 +162,7 @@ class ToBusInitFailed(unittest.TestCase): Connecting to non-existent broker address must raise MessageBusError """ regexp = re.escape(self.error) - regexp += '.*' + 'No address associated with hostname' + regexp += '.*' + '(No address associated with hostname|Name or service not known)' with self.assertRaisesRegexp(MessageBusError, regexp): with ToBus(QUEUE, broker="foo.bar", broker_options={'reconnect': False}): pass -- GitLab