fix race in sync tests (#2259)

This commit is contained in:
Svyatoslav Nikolsky
2019-04-12 10:32:00 +03:00
committed by Bastian Köcher
parent 7f59cdb900
commit 5725e25448
10 changed files with 316 additions and 241 deletions
+5
View File
@@ -466,6 +466,9 @@ pub enum NetworkMsg<B: BlockT + 'static> {
Outgoing(PeerId, Message<B>),
/// Report a peer.
ReportPeer(PeerId, Severity),
/// Synchronization response.
#[cfg(any(test, feature = "test-helpers"))]
Synchronized,
}
/// Starts the background thread that handles the networking.
@@ -548,6 +551,8 @@ fn run_thread<B: BlockT + 'static>(
},
}
},
#[cfg(any(test, feature = "test-helpers"))]
NetworkMsg::Synchronized => (),
}
Ok(())
})