Skip to content
Snippets Groups Projects
Commit 8b96e04c authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Monitoring component:

- corrected per unitary test cleanup
parent b47b86aa
No related branches found
No related tags found
2 merge requests!54Release 2.0.0,!34Context Scalability extensions using CockroachDB + Removal of Stateful database inside Device + other
......@@ -263,6 +263,8 @@ def test_monitor_kpi(
LOGGER.debug(str(response))
assert isinstance(response, Empty)
device_client.DeleteDevice(response)
# Test case that makes use of client fixture to test server's QueryKpiData method
def test_query_kpi_data(monitoring_client,subs_scheduler): # pylint: disable=redefined-outer-name
......@@ -516,6 +518,7 @@ def test_events_tools(
response = device_client.AddDevice(Device(**device_with_connect_rules))
assert response.device_uuid.uuid == DEVICE_DEV1_UUID
device_client.DeleteDevice(response)
events_collector.stop()
......@@ -543,6 +546,7 @@ def test_get_device_events(
assert event.event.event_type == EventTypeEnum.EVENTTYPE_CREATE
assert event.device_id.device_uuid.uuid == DEVICE_DEV1_UUID
device_client.DeleteDevice(response)
events_collector.stop()
def test_listen_events(
......@@ -563,9 +567,10 @@ def test_listen_events(
response = device_client.AddDevice(Device(**device_with_connect_rules))
assert response.device_uuid.uuid == DEVICE_DEV1_UUID
sleep(0.1)
sleep(1.0)
kpi_id_list = events_collector.listen_events()
assert len(kpi_id_list) > 0
device_client.DeleteDevice(response)
events_collector.stop()
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