Skip to content

Commit

Permalink
Enlarge sleep before getting IP
Browse files Browse the repository at this point in the history
I can see that in case of xen we receive an IP with delay

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
  • Loading branch information
giggsoff committed Oct 5, 2023
1 parent ae5c700 commit c8a3758
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions tests/eclient/testdata/nw_switch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ message 'Waiting of running'
test eden.app.test -test.v -timewait 20m RUNNING ping1 ping2 pong

message 'Getting "pong" IP'
exec sleep 5
eden pod ps
cp stdout pod_ps
exec bash pong_ip.sh

message 'Checking accessibility'
Expand All @@ -55,9 +52,6 @@ eden pod modify pong --networks n2
test eden.app.test -test.v -timewait 15m RUNNING pong

message 'Getting new "pong" IP'
exec sleep 5
eden pod ps
cp stdout pod_ps
exec bash pong_ip.sh
exec -t 5m bash wait_ssh.sh 2223 2224

Expand All @@ -73,9 +67,6 @@ eden pod modify pong --networks n1
test eden.app.test -test.v -timewait 15m RUNNING pong

message 'Getting new "pong" IP'
exec sleep 5
eden pod ps
cp stdout pod_ps
exec bash pong_ip.sh

message 'Testing of 1st network again'
Expand Down Expand Up @@ -120,8 +111,22 @@ do
done

-- pong_ip.sh --
echo export PONG_IP=$(grep '^ *pong\s' pod_ps | cut -f 4) > env
cat env
EDEN={{EdenConfig "eden.root"}}/{{EdenConfig "eden.bin-dist"}}/{{EdenConfig "eden.eden-bin"}}

for i in `seq 10`
do
sleep 10
PONG_IP=$($EDEN pod ps | grep '^ *pong\s' | cut -f 4)
if [ $PONG_IP != "-" ]; then
echo export PONG_IP=$PONG_IP > env
cat env
exit 0
fi
done

$EDEN pod ps
echo "failed to get PONG IP"
exit 1

-- ping.sh --
EDEN={{EdenConfig "eden.root"}}/{{EdenConfig "eden.bin-dist"}}/{{EdenConfig "eden.eden-bin"}}
Expand Down

0 comments on commit c8a3758

Please sign in to comment.