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
Peers rating handler integration test #4781
Peers rating handler integration test #4781
Conversation
… on peersRatingHandler and added integration test for peersRatingHandler
…nto peers_rating_handler_integration_test # Conflicts: # go.mod # go.sum # integrationTests/testProcessorNode.go # node/metrics/metrics.go
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.
👍 GJ
assert.Equal(t, int32(-100), initialMaliciousRating.Rating) | ||
testTimestampsForNotRespondingNode(t, initialMaliciousRating.TimestampLastResponseFromPid, initialMaliciousRating.TimestampLastRequestToPid, 0) | ||
|
||
// Add header to the malicious node's cache and remove it from the resolver's cache |
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.
L98 - L116 also test that requests are still performed towards the low rating peer 👍
}) | ||
appStatusHandler := args.AppStatusHandler | ||
if check.IfNil(args.AppStatusHandler) { | ||
appStatusHandler = TestAppStatusHandler |
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.
Is this OK? Having the same pointer TestAppStatusHandler will make debugging incredibly hard because nodes will tend to alter the same instance. Maybe not for this PR I will consider removing this TestAppStatusHandler and create different instances always.
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.
indeed, shouldn't use the same pointer
Reasoning behind the pull request
Proposed changes
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?