Add sleeps in tests for topology gossip to propagate
The new weaveworks/mesh version defers topology updates by up to 1 second, so we can't expect to connect two nodes and immediately ping between them.
This commit is contained in:
1 parent
04680fc52c
commit
4da2501d7a
6 files changed
+21
-2
No files matched your search
@@ -26,10 +26,15 @@ start_container $HOST2 $C2/24 --name=c2
|
||||
assert_raises "weave_on $HOST2 connect 10.2.2.1 10.2.2.2"
|
||||
assert_peers $HOST2 "10.2.2.1\n10.2.2.2"
|
||||
|
||||
sleep 2 # Allow topology to propagate
|
||||
|
||||
# Replace bogus hosts with real hosts
|
||||
assert_raises "exec_on $HOST1 c1 sh -c '! $PING $C2'"
|
||||
assert_raises "weave_on $HOST2 connect --replace $HOST1 $HOST2"
|
||||
assert_peers $HOST2 "$HOST1\n$HOST2"
|
||||
|
||||
sleep 2 # Allow topology to propagate
|
||||
|
||||
assert_raises "exec_on $HOST1 c1 $PING $C2"
|
||||
|
||||
# Forget everyone and disconnect
|
||||
@@ -37,6 +42,9 @@ assert_raises "weave_on $HOST2 forget $HOST1 $HOST2"
|
||||
assert_raises "stop_weave_on $HOST1"
|
||||
assert_raises "weave_on $HOST1 launch"
|
||||
assert_peers $HOST2 ""
|
||||
|
||||
sleep 2 # Allow topology to propagate
|
||||
|
||||
assert_raises "exec_on $HOST1 c1 sh -c '! $PING $C2'"
|
||||
|
||||
end_suite
|
||||
Reference in new issue
Block a user