Less sleeps (#9848)

* Less sleeps

* No need to use tokio-test crate

* Less sleep

* Avoid leaving zombie substrates around

(when panicing in tests)

* Remove unused imports

* Incorporating feedback

* rename method

* Use rpc_api

* Update bin/node/cli/tests/temp_base_path_works.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Update bin/node/cli/tests/temp_base_path_works.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Squirrel
2021-09-29 11:55:31 +01:00
committed by GitHub
parent f71d87ad28
commit e64693933f
14 changed files with 154 additions and 116 deletions
@@ -22,12 +22,12 @@ use tempfile::tempdir;
pub mod common;
#[test]
#[tokio::test]
#[cfg(unix)]
fn purge_chain_works() {
async fn purge_chain_works() {
let base_path = tempdir().expect("could not create a temp dir");
common::run_node_for_a_while(base_path.path(), &["--dev"]);
common::run_node_for_a_while(base_path.path(), &["--dev"]).await;
let status = Command::new(cargo_bin("substrate"))
.args(&["purge-chain", "--dev", "-d"])