sonic-net / sonic-mgmt

Configuration management examples for SONiC
Other
176 stars 704 forks source link

[telemetry/test_events.py] FAILS because of a timing issue #12472

Open anishb-arista opened 5 months ago

anishb-arista commented 5 months ago

Description The test telemetry/test_events.py fails because of the following reasons -

  1. We are triggering the events before we start the event thread to listen to the events, because of which the events are not always being detected.
  2. As soon as the event is detected and the script 'py_gnmicli.py' terminates, 'sonic-events-eventd-heartbeat' events are stopped from being published. Starting another testcase (the detection of another event) and starting to publish the 'sonic-events-eventd-heartbeat' again before waiting for them to be stopped from the previous testcase is resulting in a race condition.

Steps to reproduce the issue:

  1. Run the test telemetry/test_events.py on a physical testbed

Describe the results you received: assert results[0] != "", "No output from PTF docker, thread timed out after {} seconds".format(thread_timeout) AssertionError: No output from PTF docker, thread timed out after 30 seconds FAILED

Describe the results you expected: The test is expected to pass

Additional information you deem important:

**Output of `show version`:**

```
(paste your output here)
```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```
bingwang-ms commented 1 month ago

@zbud-msft Can you help check this issue?