diff --git a/Cargo.lock b/Cargo.lock index c543b4f1e54..d3e8a81f7c0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2455,6 +2455,7 @@ version = "0.0.0" dependencies = [ "actix-rt", "futures", + "near-store", ] [[package]] diff --git a/chain/client/src/client_actor.rs b/chain/client/src/client_actor.rs index d38d9eb5618..0d2b1c79215 100644 --- a/chain/client/src/client_actor.rs +++ b/chain/client/src/client_actor.rs @@ -1694,7 +1694,8 @@ pub fn start_client( sender: Option>, #[cfg(feature = "test_features")] adv: Arc>, ) -> (Addr, ArbiterHandle) { - let client_arbiter_handle = Arbiter::current(); + let client_arbiter = Arbiter::new(); + let client_arbiter_handle = client_arbiter.handle(); let client_addr = ClientActor::start_in_arbiter(&client_arbiter_handle, move |ctx| { ClientActor::new( client_config, diff --git a/test-utils/actix-test-utils/Cargo.toml b/test-utils/actix-test-utils/Cargo.toml index 902dd034c6b..615fa796f59 100644 --- a/test-utils/actix-test-utils/Cargo.toml +++ b/test-utils/actix-test-utils/Cargo.toml @@ -10,3 +10,4 @@ edition = "2021" [dependencies] actix-rt = "2" futures = "0.3" +near-store = { path = "../../core/store" } \ No newline at end of file diff --git a/test-utils/actix-test-utils/src/lib.rs b/test-utils/actix-test-utils/src/lib.rs index ab81155d433..ea93f90d818 100644 --- a/test-utils/actix-test-utils/src/lib.rs +++ b/test-utils/actix-test-utils/src/lib.rs @@ -101,4 +101,5 @@ pub fn run_actix(f: F) { let sys = actix_rt::System::new(); sys.block_on(handle_interrupt!(f)); sys.run().unwrap(); + near_store::db::RocksDB::block_until_all_instances_are_dropped(); }