Skip to content
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

Merged
merged 17 commits into from
Feb 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add time for eventd service to establish
zbud-msft committed Nov 7, 2023
commit c2f85fcbea159b3d3c58971e1b676f0e1c969f91
3 changes: 2 additions & 1 deletion src/sonic-eventd/tests/eventd_ut.cpp
Original file line number Diff line number Diff line change
@@ -601,6 +601,7 @@ TEST(eventd, service)
}

thread thread_service(&run_eventd_service);
this_thread::sleep_for(chrono::milliseconds(1000));

/* Need client side service to interact with server side */
EXPECT_EQ(0, service.init_client(zctx));
@@ -631,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));
Copy link
Collaborator

@qiluo-msft qiluo-msft Dec 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1000

Is this a critical fix? How do you pick the magic number? Is it possible to wait for a stable signal? #Closed

Copy link
Contributor

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.


EXPECT_EQ(0, service.cache_stop());