Skip to content
Snippets Groups Projects
Commit 3ee134d1 authored by Jan Rinze Peterzon's avatar Jan Rinze Peterzon
Browse files

Task #8531: add Mimetype and widen the timeout in the ctest.

parent 5017d462
No related branches found
No related tags found
No related merge requests found
......@@ -159,6 +159,9 @@ class LofarMessage(object):
else:
try:
self.__dict__['_qpid_msg'] = qpid.messaging.Message(content)
if self.__dict__['_qpid_msg'].content_type is None:
self.__dict__['_qpid_msg'].content_type='text/plain'
except KeyError:
raise InvalidMessage(
"Unsupported content type: %r" % type(content))
......
#!/usr/bin/env python
#!/usr/bin/python
"""
Program to test the RPC and Service class of the Messaging package.
It defines 5 functions and first calls those functions directly to check
......
......@@ -33,7 +33,7 @@ from lofar.messaging.messages import *
from lofar.messaging.messagebus import *
from lofar.messaging.exceptions import MessageBusError, InvalidMessage
TIMEOUT = 0.1
TIMEOUT = 1.0
# ======== FromBus unit tests ======== #
......@@ -245,9 +245,8 @@ class SendReceiveMessage(unittest.TestCase):
Helper class that implements the send/receive logic and message checks.
:param send_msg: Message to send
"""
with self.tobus:
with self.tobus, self.frombus:
self.tobus.send(send_msg)
with self.frombus:
recv_msg = self.frombus.receive(timeout=TIMEOUT)
self.frombus.ack(recv_msg)
self.assertEqual(
......
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