Commit afd3e856 authored by francisco.moreno.external@atos.net's avatar francisco.moreno.external@atos.net
Browse files

test_listen_events debugging

parent 05c66d71
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -93,12 +93,9 @@ class EventsDeviceCollector:

                            kpi_id = self._monitoring_client.CreateKpi(kpi_descriptor)
                            kpi_id_list.append(kpi_id)

            return kpi_id_list

        except ServiceException as e:
            LOGGER.exception('ListenEvents exception')

        except Exception as e:  # pragma: no cover
            LOGGER.exception('ListenEvents exception')
+4 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
# limitations under the License.

import copy, logging, os, pytest
from time import sleep
from typing import Tuple
from common.Constants import ServiceNameEnum
from common.Settings import (
@@ -414,6 +415,9 @@ def test_listen_events(
    response = device_client.AddDevice(Device(**device_with_connect_rules))
    assert response.device_uuid.uuid == DEVICE_DEV1_UUID

    sleep(0.1)

    kpi_id_list = events_collector.listen_events()

    assert len(kpi_id_list) > 0
    events_collector.stop()