Unignore test (#11097)

This commit is contained in:
wigy
2022-03-29 20:33:20 +00:00
committed by GitHub
parent e4caf7388a
commit 87f02c87d0
+26 -27
View File
@@ -186,7 +186,6 @@ fn build_nodes_one_proto() -> (
(node1, events_stream1, node2, events_stream2) (node1, events_stream1, node2, events_stream2)
} }
#[ignore]
#[test] #[test]
fn notifications_state_consistent() { fn notifications_state_consistent() {
// Runs two nodes and ensures that events are propagated out of the API in a consistent // Runs two nodes and ensures that events are propagated out of the API in a consistent
@@ -272,38 +271,38 @@ fn notifications_state_consistent() {
match next_event { match next_event {
future::Either::Left(Event::NotificationStreamOpened { future::Either::Left(Event::NotificationStreamOpened {
remote, protocol, .. remote, protocol, ..
}) => { }) =>
something_happened = true; if protocol == PROTOCOL_NAME {
assert!(!node1_to_node2_open); something_happened = true;
node1_to_node2_open = true; assert!(!node1_to_node2_open);
assert_eq!(remote, *node2.local_peer_id()); node1_to_node2_open = true;
assert_eq!(protocol, PROTOCOL_NAME); assert_eq!(remote, *node2.local_peer_id());
}, },
future::Either::Right(Event::NotificationStreamOpened { future::Either::Right(Event::NotificationStreamOpened {
remote, protocol, .. remote, protocol, ..
}) => { }) =>
something_happened = true; if protocol == PROTOCOL_NAME {
assert!(!node2_to_node1_open); something_happened = true;
node2_to_node1_open = true; assert!(!node2_to_node1_open);
assert_eq!(remote, *node1.local_peer_id()); node2_to_node1_open = true;
assert_eq!(protocol, PROTOCOL_NAME); assert_eq!(remote, *node1.local_peer_id());
}, },
future::Either::Left(Event::NotificationStreamClosed { future::Either::Left(Event::NotificationStreamClosed {
remote, protocol, .. remote, protocol, ..
}) => { }) =>
assert!(node1_to_node2_open); if protocol == PROTOCOL_NAME {
node1_to_node2_open = false; assert!(node1_to_node2_open);
assert_eq!(remote, *node2.local_peer_id()); node1_to_node2_open = false;
assert_eq!(protocol, PROTOCOL_NAME); assert_eq!(remote, *node2.local_peer_id());
}, },
future::Either::Right(Event::NotificationStreamClosed { future::Either::Right(Event::NotificationStreamClosed {
remote, protocol, .. remote, protocol, ..
}) => { }) =>
assert!(node2_to_node1_open); if protocol == PROTOCOL_NAME {
node2_to_node1_open = false; assert!(node2_to_node1_open);
assert_eq!(remote, *node1.local_peer_id()); node2_to_node1_open = false;
assert_eq!(protocol, PROTOCOL_NAME); assert_eq!(remote, *node1.local_peer_id());
}, },
future::Either::Left(Event::NotificationsReceived { remote, .. }) => { future::Either::Left(Event::NotificationsReceived { remote, .. }) => {
assert!(node1_to_node2_open); assert!(node1_to_node2_open);
assert_eq!(remote, *node2.local_peer_id()); assert_eq!(remote, *node2.local_peer_id());