nixosTests.mycelium: make less flaky
We immediately expected for the other peer to be available in the peer list, right after startup, but that's racy. Instead try the pinging multiple times until it succeeds (max 10 times), then check the list of peers for completion.
This commit is contained in:
parent
0a24a516f8
commit
bb05bee4e5
@ -61,11 +61,13 @@ import ../make-test-python.nix (
|
||||
peer1.wait_for_unit("mycelium.service")
|
||||
peer2.wait_for_unit("mycelium.service")
|
||||
|
||||
# Give mycelium some time to discover the other peer
|
||||
peer1.wait_until_succeeds("ping -c1 ${peer2-ip}", timeout=10)
|
||||
peer2.succeed("ping -c1 ${peer1-ip}")
|
||||
|
||||
peer1.succeed("mycelium peers list | grep 192.168.1.12")
|
||||
peer2.succeed("mycelium peers list | grep 192.168.1.11")
|
||||
|
||||
peer1.succeed("ping -c5 ${peer2-ip}")
|
||||
peer2.succeed("ping -c5 ${peer1-ip}")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user