mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
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.
(cherry picked from commit bb05bee4e5
)
This commit is contained in:
parent
2e769d0911
commit
7fc3f94e24
1 changed files with 4 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue