mirror of https://github.com/docker/docs.git
Merge pull request #2191 from dongluochen/testhang
Update stats test to stop connection
This commit is contained in:
commit
8cbb1b27a4
|
@ -18,9 +18,8 @@ function teardown() {
|
||||||
# make sure container is up
|
# make sure container is up
|
||||||
[ -n $(docker_swarm ps -q --filter=name=test_container --filter=status=running) ]
|
[ -n $(docker_swarm ps -q --filter=name=test_container --filter=status=running) ]
|
||||||
|
|
||||||
# storage the stats output in TEMP_FILE
|
# save the stats output in TEMP_FILE
|
||||||
# it will stop automatically when manager stop
|
docker_swarm stats --no-stream test_container > $TEMP_FILE &
|
||||||
docker_swarm stats test_container > $TEMP_FILE &
|
|
||||||
|
|
||||||
# retry until TEMP_FILE is not empty
|
# retry until TEMP_FILE is not empty
|
||||||
retry 5 1 eval "[ -s $TEMP_FILE ]"
|
retry 5 1 eval "[ -s $TEMP_FILE ]"
|
||||||
|
|
|
@ -21,9 +21,8 @@ function teardown() {
|
||||||
# make sure container is up
|
# make sure container is up
|
||||||
[ -n $(docker_swarm ps -q --filter=name=test_container --filter=status=running) ]
|
[ -n $(docker_swarm ps -q --filter=name=test_container --filter=status=running) ]
|
||||||
|
|
||||||
# storage the stats output in TEMP_FILE
|
# save the stats output in TEMP_FILE
|
||||||
# it will stop automatically when manager stop
|
docker_swarm stats --no-stream test_container > $TEMP_FILE &
|
||||||
docker_swarm stats test_container > $TEMP_FILE &
|
|
||||||
|
|
||||||
# retry until TEMP_FILE is not empty
|
# retry until TEMP_FILE is not empty
|
||||||
retry 5 1 eval "[ -s $TEMP_FILE ]"
|
retry 5 1 eval "[ -s $TEMP_FILE ]"
|
||||||
|
|
Loading…
Reference in New Issue