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>
export FAKE_TCP_LISTEN="0.0.0.0:445 0.0.0.0:139"
export FAKE_WBINFO_FAIL="no"
+
+ # Some things in 50.samba are backgrounded and waited for. If
+ # we don't sleep at all then timeouts can happen. This avoids
+ # that... :-)
+ export FAKE_SLEEP_FORCE=0.1
else
debug "Marking Samba services as down, not listening and not managed by CTDB"
# Get into known state.
#!/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