-
Notifications
You must be signed in to change notification settings - Fork 179
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
Event-based test refactoring for GossipSub RPC inspection unit tests #5374
Conversation
spamMsgFactory: func(spammerId peer.ID, _ peer.ID, topic channels.Topic) *pubsub_pb.Message { | ||
return p2ptest.PubsubMessageFixture(t, p2ptest.WithFrom(spammerId), p2ptest.WithTopic(topic.String())) | ||
}, | ||
}, |
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.
👏
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5374 +/- ##
==========================================
+ Coverage 56.04% 59.51% +3.47%
==========================================
Files 1026 430 -596
Lines 100116 44706 -55410
==========================================
- Hits 56106 26605 -29501
+ Misses 39707 16181 -23526
+ Partials 4303 1920 -2383
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This PR makes a small but significant improvement to the control message validation inspector unit tests by removing the use of time.Sleep and instead wait until
finished processing queued work item
from the internal inspection request worker pool queue effectively making the tests more reliable.