diff options
| author | Martin Schwenke <martin@meltin.net> | 2011-08-19 16:51:08 +1000 |
|---|---|---|
| committer | Martin Schwenke <martin@meltin.net> | 2011-08-30 16:51:55 +1000 |
| commit | 7b2e79ab7f5c44ba70e8ab0632bdba17226a530f (patch) | |
| tree | fe5a0c2d441a0b67e4b955c326da3484a4c6e52e /ctdb/tests/eventscripts/stubs | |
| parent | 6eb339e2c73e4944e59be122de9a616ed68598eb (diff) | |
| download | samba-7b2e79ab7f5c44ba70e8ab0632bdba17226a530f.tar.gz samba-7b2e79ab7f5c44ba70e8ab0632bdba17226a530f.tar.xz samba-7b2e79ab7f5c44ba70e8ab0632bdba17226a530f.zip | |
Tests - eventscripts - stop timeouts waiting for backgrounded testparm
Not sleeping at all speeds up the tests. However, it can also cause
timeouts. Therefore, every time sleep is run we force the stub to do
a short 0.1s sleep instead of whatever is specified. This should be
enough to avoid races.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 59a1d54bcc15058f7b69e8596b32b26427a3ae57)
Diffstat (limited to 'ctdb/tests/eventscripts/stubs')
| -rwxr-xr-x | ctdb/tests/eventscripts/stubs/sleep | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ctdb/tests/eventscripts/stubs/sleep b/ctdb/tests/eventscripts/stubs/sleep index adb63cdf41..e4542444de 100755 --- a/ctdb/tests/eventscripts/stubs/sleep +++ b/ctdb/tests/eventscripts/stubs/sleep @@ -1,7 +1,9 @@ #!/bin/sh -if [ "$REALLY_SLEEP" = "yes" ] ; then +if [ "$FAKE_SLEEP_REALLY" = "yes" ] ; then /bin/sleep "$@" +elif [ -n "$FAKE_SLEEP_FORCE" ] ; then + /bin/sleep "$FAKE_SLEEP_FORCE" else : fi |
