Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit d57f8a9

Browse files
Clean up tests from runtime.block_on() and moving around Runtime and Handle (#12941)
1 parent 8ef806c commit d57f8a9

File tree

13 files changed

+987
-1139
lines changed

13 files changed

+987
-1139
lines changed

client/beefy/src/aux_schema.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,16 @@ pub(crate) mod tests {
7777
use super::*;
7878
use crate::tests::BeefyTestNet;
7979
use sc_network_test::TestNetFactory;
80-
use tokio::runtime::Runtime;
8180

8281
// also used in tests.rs
8382
pub fn verify_persisted_version<B: BlockT, BE: Backend<B>>(backend: &BE) -> bool {
8483
let version: u32 = load_decode(backend, VERSION_KEY).unwrap().unwrap();
8584
version == CURRENT_VERSION
8685
}
8786

88-
#[test]
89-
fn should_load_persistent_sanity_checks() {
90-
let runtime = Runtime::new().unwrap();
91-
let mut net = BeefyTestNet::new(runtime.handle().clone(), 1);
87+
#[tokio::test]
88+
async fn should_load_persistent_sanity_checks() {
89+
let mut net = BeefyTestNet::new(1);
9290
let backend = net.peer(0).client().as_backend();
9391

9492
// version not available in db -> None

0 commit comments

Comments
 (0)