mirror of
https://github.com/dolthub/dolt.git
synced 2026-04-27 23:51:59 -05:00
integration-tests/bats: Add some waits on the remotesrv_pid exit for bats tests which spawn a background remotesrv.
Attempts to fix some observed flakiness in bats tests.
This commit is contained in:
@@ -19,6 +19,8 @@ setup() {
|
||||
teardown() {
|
||||
teardown_common
|
||||
kill $remotesrv_pid
|
||||
wait $remotesrv_pid || :
|
||||
remotesrv_pid=""
|
||||
rm -rf $BATS_TMPDIR/remotes-$$
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@ setup() {
|
||||
teardown() {
|
||||
teardown_common
|
||||
kill $remotesrv_pid
|
||||
wait $remotesrv_pid || :
|
||||
remotesrv_pid=""
|
||||
rm -rf $BATS_TMPDIR/remotes-$$
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@ setup() {
|
||||
teardown() {
|
||||
teardown_common
|
||||
kill $remotesrv_pid
|
||||
wait $remotesrv_pid || :
|
||||
remotesrv_pid=""
|
||||
rm -rf $BATS_TMPDIR/remotes-$$
|
||||
}
|
||||
|
||||
|
||||
@@ -14,13 +14,15 @@ setup() {
|
||||
}
|
||||
|
||||
teardown() {
|
||||
teardown_common
|
||||
stop_remotesrv
|
||||
teardown_common
|
||||
}
|
||||
|
||||
stop_remotesrv() {
|
||||
if [ -n "$remotesrv_pid" ]; then
|
||||
kill $remotesrv_pid || :
|
||||
kill "$remotesrv_pid" || :
|
||||
wait "$remotesrv_pid" || :
|
||||
remotesrv_pid=""
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -10,17 +10,18 @@ load $BATS_TEST_DIRNAME/helper/common.bash
|
||||
remotesrv_pid=""
|
||||
setup() {
|
||||
skiponwindows "tests are flaky on Windows"
|
||||
setup_common
|
||||
setup_no_dolt_init
|
||||
}
|
||||
|
||||
teardown() {
|
||||
teardown_common
|
||||
stop_remotesrv
|
||||
teardown_common
|
||||
}
|
||||
|
||||
stop_remotesrv() {
|
||||
if [ -n "$remotesrv_pid" ]; then
|
||||
kill $remotesrv_pid || :
|
||||
kill "$remotesrv_pid"
|
||||
wait "$remotesrv_pid" || :
|
||||
remotesrv_pid=""
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ teardown() {
|
||||
skiponwindows "tests are flaky on Windows"
|
||||
assert_feature_version
|
||||
teardown_common
|
||||
kill $remotesrv_pid
|
||||
rm -rf $BATS_TMPDIR/remotes-$$
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user