Commit 8b96e04c authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Monitoring component:

- corrected per unitary test cleanup
parent b47b86aa
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -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()