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

Commit

Permalink
Clean up tests from runtime.block_on() and moving around Runtime
Browse files Browse the repository at this point in the history
…and `Handle` (#12941)
  • Loading branch information
dmitry-markin authored Dec 16, 2022
1 parent 8ef806c commit d57f8a9
Show file tree
Hide file tree
Showing 13 changed files with 987 additions and 1,139 deletions.
8 changes: 3 additions & 5 deletions client/beefy/src/aux_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,16 @@ pub(crate) mod tests {
use super::*;
use crate::tests::BeefyTestNet;
use sc_network_test::TestNetFactory;
use tokio::runtime::Runtime;

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

#[test]
fn should_load_persistent_sanity_checks() {
let runtime = Runtime::new().unwrap();
let mut net = BeefyTestNet::new(runtime.handle().clone(), 1);
#[tokio::test]
async fn should_load_persistent_sanity_checks() {
let mut net = BeefyTestNet::new(1);
let backend = net.peer(0).client().as_backend();

// version not available in db -> None
Expand Down
Loading

0 comments on commit d57f8a9

Please sign in to comment.