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

fix unwrap() peer info in tests #308

Merged
merged 3 commits into from
May 6, 2022

Conversation

leviathanbeak
Copy link
Contributor

fixes #279

Sometimes during our CI test runs, a peer would disconnect and our get_peer_info(peer_id).unwrap() would break the tests,
I introduce a check with Some(peer_info) = get_peer_info(peer_id) .

I have also added a test that confirms that if a connection fails during testing that it will be re-established, continuing the testing logic where it left off prior to disconnect.

An improvement would also be introducing caching on peer disconnecting, will create an issue for it.

@leviathanbeak leviathanbeak merged commit 63d7bda into master May 6, 2022
@leviathanbeak leviathanbeak deleted the leviathanbeak/fix_p2p_tests_on_unwraps branch May 6, 2022 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

p2p tests: fix unwraps on get_peer_info()
2 participants