Skip to content
Snippets Groups Projects
Commit 73f4078f authored by Auke Klazema's avatar Auke Klazema
Browse files

SW-658: Fix Error message check in tests

parent 5a847944
No related branches found
No related tags found
1 merge request!6Import cobalt2 into lofar4
......@@ -143,7 +143,7 @@ class FromBusInitFailed(unittest.TestCase):
"""
Connecting to non-existent broker address must raise MessageBusError
"""
with self.assertRaisesRegex(MessageBusError, "Name or service not known"):
with self.assertRaisesRegex(MessageBusError, "No address associated with hostname"):
with FromBus(self.test_queue.address, broker="foo.bar", auto_reconnect=False):
pass
......@@ -151,7 +151,7 @@ class FromBusInitFailed(unittest.TestCase):
"""
Connecting to broker on wrong port must raise MessageBusError
"""
with self.assertRaisesRegex(MessageBusError, "Connection refused"):
with self.assertRaisesRegex(MessageBusError, "recv: errno: 111"):
with FromBus("fake" + self.test_queue.address, broker="localhost:4", auto_reconnect=False):
pass
......@@ -195,7 +195,7 @@ class ToBusInitFailed(unittest.TestCase):
"""
Connecting to non-existent broker address must raise MessageBusError
"""
with self.assertRaisesRegex(MessageBusError, "Name or service not known"):
with self.assertRaisesRegex(MessageBusError, "No address associated with hostname"):
with ToBus(self.test_queue.address, broker="foo.bar", auto_reconnect=False):
pass
......@@ -203,7 +203,7 @@ class ToBusInitFailed(unittest.TestCase):
"""
Connecting to broker on wrong port must raise MessageBusError
"""
with self.assertRaisesRegex(MessageBusError, "Connection refused"):
with self.assertRaisesRegex(MessageBusError, "recv: errno: 111"):
with ToBus(self.test_queue.address, broker="localhost:4", auto_reconnect=False):
pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment