Skip to content
Snippets Groups Projects
Commit afd3e856 authored by francisco.moreno.external@atos.net's avatar francisco.moreno.external@atos.net
Browse files

test_listen_events debugging

parent 05c66d71
No related branches found
No related tags found
1 merge request!54Release 2.0.0
...@@ -93,12 +93,9 @@ class EventsDeviceCollector: ...@@ -93,12 +93,9 @@ class EventsDeviceCollector:
kpi_id = self._monitoring_client.CreateKpi(kpi_descriptor) kpi_id = self._monitoring_client.CreateKpi(kpi_descriptor)
kpi_id_list.append(kpi_id) kpi_id_list.append(kpi_id)
return kpi_id_list return kpi_id_list
except ServiceException as e: except ServiceException as e:
LOGGER.exception('ListenEvents exception') LOGGER.exception('ListenEvents exception')
except Exception as e: # pragma: no cover except Exception as e: # pragma: no cover
LOGGER.exception('ListenEvents exception') LOGGER.exception('ListenEvents exception')
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
# limitations under the License. # limitations under the License.
import copy, logging, os, pytest import copy, logging, os, pytest
from time import sleep
from typing import Tuple from typing import Tuple
from common.Constants import ServiceNameEnum from common.Constants import ServiceNameEnum
from common.Settings import ( from common.Settings import (
...@@ -414,6 +415,9 @@ def test_listen_events( ...@@ -414,6 +415,9 @@ def test_listen_events(
response = device_client.AddDevice(Device(**device_with_connect_rules)) response = device_client.AddDevice(Device(**device_with_connect_rules))
assert response.device_uuid.uuid == DEVICE_DEV1_UUID assert response.device_uuid.uuid == DEVICE_DEV1_UUID
sleep(0.1)
kpi_id_list = events_collector.listen_events() kpi_id_list = events_collector.listen_events()
assert len(kpi_id_list) > 0 assert len(kpi_id_list) > 0
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