-
Notifications
You must be signed in to change notification settings - Fork 803
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
network/tests: Add conformance testing for litep2p and libp2p #7361
base: master
Are you sure you want to change the base?
Conversation
connectivity Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
NotificationEvent::NotificationReceived { .. } => { | ||
received += 1; | ||
if received >= ping_pong_num { | ||
break; | ||
} | ||
|
||
notifications_left.send_async_notification(&right_peer_id, vec![1, 2, 3]).await.unwrap(); | ||
} |
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.
dq: Why is this part of connect_notifications
and not of a higher level test?
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.
That's a good point, I'll revert this and await 1 notification before handing this to the tests 🙏
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.
Why do we need to await any notifications here at all?
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.
Wanted to not repeat the awaiting on listen addresses, add_reserved_peer
and accepting substreams via: NotificationEvent::NotificationStreamOpened
and NotificationEvent::ValidateInboundSubstream
in other tests
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.
Yeah, understand — I mean why we need to send notification / handle NotificationEvent::NotificationReceived
in the setup code?
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This PR implements conformance tests between our network backends (litep2p and libp2p).
The PR creates a setup for extending testing in the future, while implementing the following tests:
cc @paritytech/networking