From b14d109bae52749142a6f503f7cc5751100288c2 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Mon, 30 Jan 2017 20:31:19 +0100 Subject: update wallet api tests --- tests/libwallet_api_tests/main.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/libwallet_api_tests/main.cpp b/tests/libwallet_api_tests/main.cpp index 6f33684cd..cb1169df3 100644 --- a/tests/libwallet_api_tests/main.cpp +++ b/tests/libwallet_api_tests/main.cpp @@ -897,7 +897,8 @@ TEST_F(WalletTest2, WalletCallBackRefreshedAsync) std::chrono::seconds wait_for = std::chrono::seconds(20); std::unique_lock lock (wallet_src_listener->mutex); - wallet_src->initAsync(TESTNET_DAEMON_ADDRESS, 0); + wallet_src->init(MAINNET_DAEMON_ADDRESS, 0); + wallet_src->startRefresh(); std::cerr << "TEST: waiting on refresh lock...\n"; wallet_src_listener->cv_refresh.wait_for(lock, wait_for); std::cerr << "TEST: refresh lock acquired...\n"; @@ -1050,8 +1051,8 @@ TEST_F(WalletManagerMainnetTest, CreateAndRefreshWalletMainNetAsync) std::chrono::seconds wait_for = std::chrono::seconds(SECONDS_TO_REFRESH); std::unique_lock lock (wallet_listener->mutex); - wallet->initAsync(MAINNET_DAEMON_ADDRESS, 0); - // wallet->init(MAINNET_DAEMON_ADDRESS, 0); + wallet->init(MAINNET_DAEMON_ADDRESS, 0); + wallet->startRefresh(); std::cerr << "TEST: waiting on refresh lock...\n"; wallet_listener->cv_refresh.wait_for(lock, wait_for); std::cerr << "TEST: refresh lock acquired...\n"; @@ -1076,8 +1077,8 @@ TEST_F(WalletManagerMainnetTest, OpenAndRefreshWalletMainNetAsync) std::chrono::seconds wait_for = std::chrono::seconds(SECONDS_TO_REFRESH); std::unique_lock lock (wallet_listener->mutex); - wallet->initAsync(MAINNET_DAEMON_ADDRESS, 0); - // wallet->init(MAINNET_DAEMON_ADDRESS, 0); + wallet->init(MAINNET_DAEMON_ADDRESS, 0); + wallet->startRefresh(); std::cerr << "TEST: waiting on refresh lock...\n"; wallet_listener->cv_refresh.wait_for(lock, wait_for); std::cerr << "TEST: refresh lock acquired...\n"; @@ -1110,8 +1111,8 @@ TEST_F(WalletManagerMainnetTest, RecoverAndRefreshWalletMainNetAsync) std::unique_ptr wallet_listener (new MyWalletListener(wallet)); std::chrono::seconds wait_for = std::chrono::seconds(SECONDS_TO_REFRESH); std::unique_lock lock (wallet_listener->mutex); - wallet->initAsync(MAINNET_DAEMON_ADDRESS, 0); - // wallet->init(MAINNET_DAEMON_ADDRESS, 0); + wallet->init(MAINNET_DAEMON_ADDRESS, 0); + wallet->startRefresh(); std::cerr << "TEST: waiting on refresh lock...\n"; // here we wait for 120 seconds and test if wallet doesn't syncrnonize blockchain completely, -- cgit v1.2.3