Skip to content

Commit 0c6df32

Browse files
committed
fix wallet::test::list_transactions::skip_sync
1 parent d7ee8bf commit 0c6df32

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/wallet/test/list_transactions.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ fn success() {
107107
fn skip_sync() {
108108
initialize();
109109

110+
let check_timeout = 10;
111+
let check_interval = 1000;
112+
110113
let (wallet, online) = get_empty_wallet!();
111114

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

118121
// transaction list reports the TX after manually syncing
119-
wallet.sync(online.clone()).unwrap();
120-
let transactions = test_list_transactions(&wallet, None);
121-
assert_eq!(transactions.len(), 1);
122+
assert!(wait_for_function(
123+
|| {
124+
wallet.sync(online.clone()).unwrap();
125+
let transactions = test_list_transactions(&wallet, None);
126+
transactions.len() == 1
127+
},
128+
check_timeout,
129+
check_interval,
130+
));
122131
}

0 commit comments

Comments
 (0)