Fix flaky test (#9729)

* Fix flaky test

* Restore cargo fmt

Co-authored-by: Roman Proskuryakov <r.proskuryakoff@gmail.com>
This commit is contained in:
Pierre Krieger
2021-09-08 20:45:24 +02:00
committed by GitHub
parent f7a421f488
commit 5666d9de94
@@ -527,11 +527,12 @@ fn fallback_name_working() {
// Wait for the `NotificationStreamOpened`.
loop {
match events_stream1.next().await.unwrap() {
Event::NotificationStreamOpened { protocol, negotiated_fallback, .. } => {
assert_eq!(protocol, NEW_PROTOCOL_NAME);
Event::NotificationStreamOpened { protocol, negotiated_fallback, .. }
if protocol == NEW_PROTOCOL_NAME =>
{
assert_eq!(negotiated_fallback, Some(PROTOCOL_NAME));
break
},
}
_ => {},
};
}