Stop proxy in controller tests to allow dir cleanup on Windows (#363)

* Stop wallet proxy in controller tests to allow directory cleanup in Windows

* Update test client

* Update to latest grin master

* is_unspent -> get_unspent
This commit is contained in:
jaspervdm
2020-03-10 12:00:33 +01:00
committed by GitHub
parent 1810854b24
commit 63eb25a92b
15 changed files with 63 additions and 15 deletions
+3
View File
@@ -23,6 +23,7 @@ use grin_wallet_util::grin_core as core;
use self::libwallet::{InitTxArgs, Slate};
use impls::test_framework::{self, LocalWalletClient};
use impls::{PathToSlate, SlateGetter as _, SlatePutter as _};
use std::sync::atomic::Ordering;
use std::thread;
use std::time::Duration;
@@ -35,6 +36,7 @@ fn file_repost_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error>
// Create a new proxy to simulate server and wallet responses
let mut wallet_proxy = create_wallet_proxy(test_dir);
let chain = wallet_proxy.chain.clone();
let stopper = wallet_proxy.running.clone();
// Create a new wallet test client, and set its queues to communicate with the
// proxy
@@ -248,6 +250,7 @@ fn file_repost_test_impl(test_dir: &'static str) -> Result<(), libwallet::Error>
})?;
// let logging finish
stopper.store(false, Ordering::Relaxed);
thread::sleep(Duration::from_millis(200));
Ok(())
}