-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[eventd] Fix eventd UT flakiness #17055
Conversation
/azpw ms_conflict |
1 similar comment
/azpw ms_conflict |
@StormLiangMS Can you please review? I have tested this issue on official build pipeline and I am no longer seeing any flakiness in 12+ consecutive runs. |
src/sonic-eventd/tests/eventd_ut.cpp
Outdated
@@ -625,7 +632,7 @@ TEST(eventd, service) | |||
run_pub(mock_pub, wr_source, wr_evts); | |||
|
|||
/* Published events must have been captured. Give a pause, to ensure sent. */ | |||
this_thread::sleep_for(chrono::milliseconds(200)); | |||
this_thread::sleep_for(chrono::milliseconds(1000)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ZMQ is async. No signal indication. It silently drops when not good.
src/sonic-eventd/tests/eventd_ut.cpp
Outdated
|
||
while(true) { | ||
auto current_ts = chrono::steady_clock::now(); | ||
if(chrono::duration_cast<chrono::milliseconds>(current_ts - poll_start_ts).count() >= max_polling_duration) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[](http://example.com/codeflow?start=0&length=5)
Mix using tabs (several lines in the new code) and spaces. #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
### Why I did it Fix flakiness of eventd UT - run sub after capture service starts ##### Work item tracking - Microsoft ADO **(number only)**:25650744 #### How I did it Run sub socket after capture socket is initialized #### How to verify it Pipeline
Cherry-pick PR to 202311: #18111 |
### Why I did it Fix flakiness of eventd UT - run sub after capture service starts ##### Work item tracking - Microsoft ADO **(number only)**:25650744 #### How I did it Run sub socket after capture socket is initialized #### How to verify it Pipeline
### Why I did it Fix flakiness of eventd UT - run sub after capture service starts ##### Work item tracking - Microsoft ADO **(number only)**:25650744 #### How I did it Run sub socket after capture socket is initialized #### How to verify it Pipeline
Cherry-pick PR to 202305: #18249 |
### Why I did it Fix flakiness of eventd UT - run sub after capture service starts ##### Work item tracking - Microsoft ADO **(number only)**:25650744 #### How I did it Run sub socket after capture socket is initialized #### How to verify it Pipeline
### Why I did it Fix flakiness of eventd UT - run sub after capture service starts ##### Work item tracking - Microsoft ADO **(number only)**:25650744 #### How I did it Run sub socket after capture socket is initialized #### How to verify it Pipeline
### Why I did it Fix flakiness of eventd UT - run sub after capture service starts ##### Work item tracking - Microsoft ADO **(number only)**:25650744 #### How I did it Run sub socket after capture socket is initialized #### How to verify it Pipeline
Why I did it
Fix flakiness of eventd UT - run sub after capture service starts
Work item tracking
How I did it
Run sub socket after capture socket is initialized
How to verify it
Pipeline
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)