Skip to content
Snippets Groups Projects
Commit 39daf761 authored by Stefano Di Frischia's avatar Stefano Di Frischia
Browse files

L2SS-542: add time sleep to archiving tests

parent 4209b2e5
Branches
Tags
1 merge request!240Resolve L2SS-542 "Add timescaledb views"
...@@ -40,7 +40,8 @@ make start sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim ...@@ -40,7 +40,8 @@ make start sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim
sleep 5 sleep 5
make start device-boot device-apsct device-apspu device-sdp device-recv device-sst device-unb2 device-xst device-beam make start device-boot device-apsct device-apspu device-sdp device-recv device-sst device-unb2 device-xst device-beam
make start archiver-timescale hdbppts-cm hdbppts-es # starting order is important # Archive devices -> starting order is important
make start archiver-timescale hdbppts-cm hdbppts-es
# Give devices time to restart # Give devices time to restart
# TODO(Corne Lukken): Use a nicer more reliable mechanism # TODO(Corne Lukken): Use a nicer more reliable mechanism
......
...@@ -40,8 +40,6 @@ class TestArchiver(BaseIntegrationTestCase): ...@@ -40,8 +40,6 @@ class TestArchiver(BaseIntegrationTestCase):
"""Test archiver configuration file""" """Test archiver configuration file"""
config_dict = self.archiver.get_configuration() config_dict = self.archiver.get_configuration()
self.assertIsNotNone(config_dict) self.assertIsNotNone(config_dict)
# Apply the configuration file
self.archiver.apply_configuration(config_dict)
def test_archive_scalar_attribute(self): def test_archive_scalar_attribute(self):
"""Test if a scalar attribute is correctly archived""" """Test if a scalar attribute is correctly archived"""
...@@ -58,6 +56,7 @@ class TestArchiver(BaseIntegrationTestCase): ...@@ -58,6 +56,7 @@ class TestArchiver(BaseIntegrationTestCase):
# Safety operation that prevents event subscriber to go in Fault state # Safety operation that prevents event subscriber to go in Fault state
self.archiver.remove_attributes_in_error() self.archiver.remove_attributes_in_error()
time.sleep(3)
attr_fullname = 'stat/recv/1/recvtr_translator_busy_r' # boolean attr_fullname = 'stat/recv/1/recvtr_translator_busy_r' # boolean
self.archiver.add_attribute_to_archiver(attr_fullname, polling_period=1000, event_period=3000) self.archiver.add_attribute_to_archiver(attr_fullname, polling_period=1000, event_period=3000)
time.sleep(3) time.sleep(3)
...@@ -96,9 +95,10 @@ class TestArchiver(BaseIntegrationTestCase): ...@@ -96,9 +95,10 @@ class TestArchiver(BaseIntegrationTestCase):
# Safety operation that prevents event subscriber to go in Fault state # Safety operation that prevents event subscriber to go in Fault state
self.archiver.remove_attributes_in_error() self.archiver.remove_attributes_in_error()
time.sleep(3)
attr_fullname = 'stat/sdp/1/fpga_temp_r' # double attr_fullname = 'stat/sdp/1/fpga_temp_r' # double
self.archiver.add_attribute_to_archiver(attr_fullname, polling_period=1000, event_period=3000) self.archiver.add_attribute_to_archiver(attr_fullname, polling_period=1000, event_period=3000)
time.sleep(5) time.sleep(3)
# Test if the attribute has been correctly added to event subscriber # Test if the attribute has been correctly added to event subscriber
self.assertTrue(self.archiver.is_attribute_archived(attr_fullname)) self.assertTrue(self.archiver.is_attribute_archived(attr_fullname))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment