ctdb-tests: Explicitly check for local daemons when shutting down
authorMartin Schwenke <martin@meltin.net>
Fri, 28 Sep 2018 10:39:18 +0000 (20:39 +1000)
committerAmitay Isaacs <amitay@samba.org>
Mon, 8 Oct 2018 00:46:22 +0000 (02:46 +0200)
This is clearer if the logic is explicit...  and...

There are too many functions to start/stop daemons.  Simplify this.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/simple/99_daemons_shutdown.sh

index d20ca5ba693b5f6417c8ac43744fc517f11a3ee3..8d65f613976455195fdfff812d49faa7fb5a5786 100755 (executable)
@@ -18,6 +18,6 @@ EOF
 # Do not call ctdb_test_init() here.  It will setup ctdb_test_exit()
 # to run and that will find the daemons missing and restart them!
 
-# We only want to consider stopping CTDB if we're running local
-# daemons.  This function will do the right thing.
-maybe_stop_ctdb
+if [ -n "$TEST_LOCAL_DAEMONS" ] ; then
+       ctdb_stop_all
+fi