diff --git a/LCS/Messaging/python/messaging/test/t_messagebus.py b/LCS/Messaging/python/messaging/test/t_messagebus.py index 9fd36ba7db3e143415fe0ecee7256b53eaf31fc3..352dbb495933865912b547e5a1146c39b41d705d 100644 --- a/LCS/Messaging/python/messaging/test/t_messagebus.py +++ b/LCS/Messaging/python/messaging/test/t_messagebus.py @@ -468,7 +468,9 @@ class SendReceiveMessage(unittest.TestCase): """ Test send/receive of an RequestMessage, containing a large string """ - content = 100000*'abcdefghijklmnopqrstuvwxyz' #large enough string, but not too big to overload the broker buffers + content = ((2**16)+1)*'a' # test if the messages can handle a string with more than 2^16 chars which is aparently a probly for some brokers of messaging libs. + # so, we need a large enough string, but not too big to overload the broker buffers when running multiple tests at the same time + self._test_sendrecv(RequestMessage(content, reply_to=self.test_queue.address)) def test_sendrecv_request_message_with_nested_dicts_and_lists_with_special_types(self): @@ -483,7 +485,8 @@ class SendReceiveMessage(unittest.TestCase): {'a': 'b', 'c': { 'timestamp': round_to_millisecond_precision(datetime.utcnow())}}], 'bar': [], - 'large_string': 100000*'abcdefghijklmnopqrstuvwxyz' #large enough string, but not too big to overload the broker buffers + 'large_string': ((2**16)+1)*'a' # test if the messages can handle a string with more than 2^16 chars which is aparently a probly for some brokers of messaging libs. + # so, we need a large enough string, but not too big to overload the broker buffers when running multiple tests at the same time } self._test_sendrecv(RequestMessage(content, reply_to=self.test_queue.address))