Skip to content

Commit

Permalink
fix wallet::test::list_transactions::skip_sync
Browse files Browse the repository at this point in the history
  • Loading branch information
zoedberg committed Nov 13, 2024
1 parent d7ee8bf commit 0c6df32
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/wallet/test/list_transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ fn success() {
fn skip_sync() {
initialize();

let check_timeout = 10;
let check_interval = 1000;

let (wallet, online) = get_empty_wallet!();

send_to_address(test_get_address(&wallet));
Expand All @@ -116,7 +119,13 @@ fn skip_sync() {
assert_eq!(transactions.len(), 0);

// transaction list reports the TX after manually syncing
wallet.sync(online.clone()).unwrap();
let transactions = test_list_transactions(&wallet, None);
assert_eq!(transactions.len(), 1);
assert!(wait_for_function(
|| {
wallet.sync(online.clone()).unwrap();
let transactions = test_list_transactions(&wallet, None);
transactions.len() == 1
},
check_timeout,
check_interval,
));
}

0 comments on commit 0c6df32

Please sign in to comment.