Skip to content

Commit 354a965

Browse files
author
rafael_chicoli
committed
driver: sleep 5 seconds before stopping logger
1 parent f209e52 commit 354a965

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ script:
2727
# - sudo make acceptance_tests || exit 1
2828
# - sudo env BATS_TESTFILE=01-integration.bats make suite_tests || exit 1
2929
# - sudo env BATS_TESTFILE=02-acceptance.bats make suite_tests || exit 1
30-
- sudo env SLEEP_TIME=30 ./scripts/basht.sh --test-dir tests/integration-tests
31-
- sudo env SLEEP_TIME=30 ./scripts/basht.sh --test-dir tests/acceptance-tests
30+
- sudo env SLEEP_TIME=10 ./scripts/basht.sh --test-dir tests/integration-tests
31+
- sudo env SLEEP_TIME=10 ./scripts/basht.sh --test-dir tests/acceptance-tests
3232

3333
stages:
3434
# - name: cache

pkg/docker/driver.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,8 @@ func (d *Driver) StartLogging(file string, info logger.Info) error {
335335
// StopLogging ...
336336
func (d *Driver) StopLogging(file string) error {
337337

338+
time.Sleep(5 * time.Second)
339+
338340
d.mu.Lock()
339341
// full path: /var/lib/docker/plugins/1ce514430f4da85be15e02ce6956e506246190ea790753a58f7821892b4639ef/
340342
// rootfs/run/docker/logging/4f8fdcf6793a3a72296e4aedf4f94f5bb5269b3f52eb17061bfe0fd75c66776a

tests/helpers.bash

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ function _debug() {
103103
docker ps -a
104104
docker logs elasticsearch
105105

106-
tail -n100 /var/log/upstart/docker.log || echo "log does not exist"
107-
tail -n100 /var/log/daemon.log || echo "log does not exist"
106+
tail -n50 /var/log/upstart/docker.log || echo "log does not exist"
108107

109108
echo "searching for all documents: "
110109
curl -k --connect-timeout 5 -u "${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}" \

0 commit comments

Comments
 (0)