-
Notifications
You must be signed in to change notification settings - Fork 632
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
migrated connect_to_unbanned_peer test #8196
Conversation
if let Err(err) = self.state.peer_store.update_connected_peers_last_seen(&self.clock) { | ||
tracing::error!(target: "network", ?err, "Failed to update peers last seen time."); | ||
} | ||
self.state.peer_store.update(&self.clock); |
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 a nice simplification moving all the updates to one function.
@@ -100,7 +100,7 @@ pub(crate) enum ClosingReason { | |||
#[error("Received a message of type not allowed on this connection.")] | |||
DisallowedMessage, | |||
#[error("PeerManager requested to close the connection")] | |||
PeerManager, | |||
PeerManagerRequest, |
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.
👍
tracing::info!(target:"test", "pm0 reconnects to pm1"); | ||
pm0.connect_to(&pm1.peer_info(), tcp::Tier::T2).await; | ||
|
||
drop(pm0); |
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 it necessary to drop these manually?
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.
here is the context:
// These drop() calls fix the place at which we want the values to be dropped, |
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.
Big thank you for improving the reliability of our tests.
Migrated connect_to_unbanned_peer test from integration-tests to near-network. It was flaky when executed in presubmit. I've made it more synchronized and faked out time, so now it shouldn't cause problems any more. I've tested it locally for flakiness (multiple concurrent runs in a loop) and observed no problems. To accomodate the test logic, I reorganized a bit the implementation of some PeerStore methods, but no semantic change was introduced there.
Migrated connect_to_unbanned_peer test from integration-tests to near-network. It was flaky when executed in presubmit. I've made it more synchronized and faked out time, so now it shouldn't cause problems any more. I've tested it locally for flakiness (multiple concurrent runs in a loop) and observed no problems. To accomodate the test logic, I reorganized a bit the implementation of some PeerStore methods, but no semantic change was introduced there.
Migrated connect_to_unbanned_peer test from integration-tests to near-network.
It was flaky when executed in presubmit. I've made it more synchronized and faked out time, so now it shouldn't cause problems any more. I've tested it locally for flakiness (multiple concurrent runs in a loop) and observed no problems.
To accomodate the test logic, I reorganized a bit the implementation of some PeerStore methods, but no semantic change was introduced there.