From 3460d79f88e2f84eeec7f021519d096a94c348a2 Mon Sep 17 00:00:00 2001 From: Artem Pikulin Date: Fri, 5 Feb 2021 13:31:57 +0700 Subject: [PATCH] Move wait_log_re!(mm_bob, 22., "INFO Listening on") upper. --- mm2src/mm2_tests.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mm2src/mm2_tests.rs b/mm2src/mm2_tests.rs index 47c64db227..49ac7d1c5a 100644 --- a/mm2src/mm2_tests.rs +++ b/mm2src/mm2_tests.rs @@ -762,6 +762,10 @@ async fn trade_base_rel_electrum(pairs: Vec<(&'static str, &'static str)>) { log! ({"Bob log path: {}", mm_bob.log_path.display()}) } + // wait until bob starts listening on the p2p port and sleep for 1 second + wait_log_re!(mm_bob, 22., "INFO Listening on"); + Timer::sleep(1.).await; + // Both Alice and Bob might try to bind on the "0.0.0.0:47773" DHT port in this test // (because the local "127.0.0.*:47773" addresses aren't that useful for DHT). // We want to give Bob a headstart in acquiring the port, @@ -795,10 +799,6 @@ async fn trade_base_rel_electrum(pairs: Vec<(&'static str, &'static str)>) { wait_log_re!(mm_bob, 22., ">>>>>>>>> DEX stats "); wait_log_re!(mm_alice, 22., ">>>>>>>>> DEX stats "); - // wait until bob starts listening on the p2p port and sleep for 1 second - wait_log_re!(mm_bob, 22., "INFO Listening on"); - Timer::sleep(1.).await; - // Enable coins on Bob side. Print the replies in case we need the address. let rc = enable_coins_eth_electrum(&mm_bob, vec!["http://195.201.0.6:8565"]).await; log! ({"enable_coins (bob): {:?}", rc});