Integration tests (#805)

* Started substrate tests

* Sync test

* Test updates

* Improved tests

* Use on-chain block delay

* Parallel test execution

* Otimized tests

* Logging

* Fixed racing test

* Fixed compilation

* Fixed timestamp test

* Removed rlp dependency

* Minor fixes

* Fixed tests

* Removed best_block_id and resolved fdlimit issue

* Whitespace

* Use keyring

* Style

* Added API execution setting

* Removed stale import
This commit is contained in:
Arkadiy Paronyan
2018-09-28 11:37:55 +02:00
committed by Gav Wood
parent 955a5393d8
commit 9a660f82ed
30 changed files with 590 additions and 140 deletions
+6 -2
View File
@@ -32,6 +32,7 @@ use futures::sync::mpsc;
use std::sync::Arc;
use tokio::runtime::TaskExecutor;
use tokio::executor::Executor;
use super::NetworkService;
@@ -260,7 +261,7 @@ impl<P: AuthoringApi + Send + Sync + 'static> Network for ConsensusNetwork<P> {
&self, validators: &[SessionKey],
local_id: SessionKey,
parent_hash: Hash,
task_executor: TaskExecutor
mut task_executor: TaskExecutor
) -> (Self::Input, Self::Output)
{
let sink = BftSink {
@@ -284,7 +285,10 @@ impl<P: AuthoringApi + Send + Sync + 'static> Network for ConsensusNetwork<P> {
});
match process_task {
Some(task) => task_executor.spawn(task),
Some(task) =>
if let Err(e) = Executor::spawn(&mut task_executor, Box::new(task)) {
debug!(target: "node-network", "Cannot spawn message processing: {:?}", e)
},
None => warn!(target: "node-network", "Cannot process incoming messages: network appears to be down"),
}