Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Get rid of runtime.block_on() in BEEFY tests
  • Loading branch information
dmitry-markin committed Dec 9, 2022
commit ab427df73c0e127e257775b863b3d1543b5145d7
9 changes: 4 additions & 5 deletions client/beefy/src/aux_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,17 @@ pub(crate) mod tests {
use super::*;
use crate::tests::BeefyTestNet;
use sc_network_test::TestNetFactory;
use tokio::runtime::Runtime;
use tokio::runtime::Handle;

// 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(Handle::current(), 1);
let backend = net.peer(0).client().as_backend();

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