-
Notifications
You must be signed in to change notification settings - Fork 180
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
1898 slashing violations consumer alsp integration test #4549
1898 slashing violations consumer alsp integration test #4549
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4549 +/- ##
==========================================
- Coverage 56.25% 54.45% -1.81%
==========================================
Files 653 914 +261
Lines 64699 85282 +20583
==========================================
+ Hits 36396 46437 +10041
- Misses 25362 35255 +9893
- Partials 2941 3590 +649
Flags with carried forward coverage won't be shown. Click here to find out 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.
Overall, looks excellent 🚀 , I added a few cosmetic comments.
Co-authored-by: Yahya Hassanzadeh, Ph.D. <yhassanzadeh@ieee.org>
Co-authored-by: Yahya Hassanzadeh, Ph.D. <yhassanzadeh@ieee.org>
Co-authored-by: Yahya Hassanzadeh, Ph.D. <yhassanzadeh@ieee.org>
Co-authored-by: Yahya Hassanzadeh, Ph.D. <yhassanzadeh@ieee.org>
}() | ||
} | ||
} | ||
unittest.RequireReturnsBefore(t, violationsWg.Wait, 100*time.Millisecond, "slashing violations not reported in time") |
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.
do the calls to report each violation need to be done async? This could introduce flakiness due to timeouts, while reporting the callbacks serially most likely wouldn't.
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.
This is done async so that we can ensure all async components under the hood are working as expected (queue, locks, workers etc). This will not cause flakiness as there are no network operations happening, it's just building up a queue of violations that will eventually be processed.
This PR adds an E2E functional test for the ALSP slashing violations consumer integration. The test ensures that the slashing violation consumer is reporting misbehaviors for slashable offenses as expected.