Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
  • Loading branch information
sandreim committed Jan 12, 2022
1 parent ffea18f commit 5bd56bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node/core/chain-selection/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
parking_lot = "0.11"
assert_matches = "1"
kvdb-memorydb = "0.10.0"
sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" }
3 changes: 3 additions & 0 deletions node/core/chain-selection/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ use assert_matches::assert_matches;
use futures::channel::oneshot;
use parity_scale_codec::Encode;
use parking_lot::Mutex;
use sc_keystore::LocalKeystore;
use sp_core::testing::TaskExecutor;

use polkadot_node_subsystem::{
Expand Down Expand Up @@ -234,6 +235,7 @@ fn test_harness<T: Future<Output = VirtualOverseer>>(
) {
let pool = TaskExecutor::new();
let (context, virtual_overseer) = test_helpers::make_subsystem_context(pool);
let keystore = Arc::new(LocalKeystore::in_memory()) as SyncCryptoStorePtr;

let backend = TestBackend::default();
let clock = TestClock::new(0);
Expand All @@ -242,6 +244,7 @@ fn test_harness<T: Future<Output = VirtualOverseer>>(
backend.clone(),
StagnantCheckInterval::new(TEST_STAGNANT_INTERVAL),
Box::new(clock.clone()),
keystore,
);

let test_fut = test(backend, clock, virtual_overseer);
Expand Down

0 comments on commit 5bd56bb

Please sign in to comment.