Skip to content
Snippets Groups Projects
Commit e504c80e authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

TMSS-2896: fixed test to use the temporary exchnge/queue in the...

TMSS-2896: fixed test to use the temporary exchnge/queue in the TMSSTestEnvironment. The trick is to import the service after setting up the tmpp exchange/que and testenv, so it can use the overridden DEFAULT_BUSNAME
parent 5d26fb99
No related branches found
No related tags found
1 merge request!1316Resolve TMSS-2896
......@@ -29,8 +29,6 @@ if skip_integration_tests():
exit(3)
from lofar.messaging.messagebus import TemporaryExchange, BusListenerJanitor
from lofar.sas.tmss.services.calibrator_selector import create_calibrator_selector_service
from lofar.sas.tmss.services.calibrator_selector_rpc import TMSSCalibratorSelectorRPCClient
class TestCalibratorSelectorService(unittest.TestCase):
'''
......@@ -67,6 +65,9 @@ class TestCalibratorSelectorService(unittest.TestCase):
This test starts a calibrator selector service and queries it via the RPC client
'''
from lofar.sas.tmss.services.calibrator_selector import create_calibrator_selector_service
from lofar.sas.tmss.services.calibrator_selector_rpc import TMSSCalibratorSelectorRPCClient
# create and start the service (the object under test)
service = create_calibrator_selector_service(exchange=self.tmp_exchange.address)
with BusListenerJanitor(service):
......@@ -89,8 +90,10 @@ class TestCalibratorSelectorService(unittest.TestCase):
which then uses the service to determine a calibrator.
'''
from lofar.sas.tmss.services.calibrator_selector import create_calibrator_selector_service
# create and start the service (the object under test)
service = create_calibrator_selector_service() # todo: exchange=self.tmp_exchange.address ?
service = create_calibrator_selector_service(exchange=self.tmp_exchange.address)
with BusListenerJanitor(service):
# now for the real test: query TMSS endpoint that uses the service
with self.tmss_test_env.create_tmss_client() as tmss_client:
......
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