]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-tests: Clean up and rename simple transaction_loop recovery test
authorMartin Schwenke <martin@meltin.net>
Tue, 2 Aug 2016 04:52:14 +0000 (14:52 +1000)
committerMartin Schwenke <martins@samba.org>
Mon, 8 Aug 2016 06:17:33 +0000 (08:17 +0200)
* Rename to clarify purpose of test

* Simplify test info to avoid unnecessary bit-rot

* Restart after test since test does heavy database manipulation

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109

Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/simple/54_transaction_loop_recovery.sh [moved from ctdb/tests/simple/54_ctdb_transaction_recovery.sh with 71% similarity]

similarity index 71%
rename from ctdb/tests/simple/54_ctdb_transaction_recovery.sh
rename to ctdb/tests/simple/54_transaction_loop_recovery.sh
index 3918c336073a280b68cbbe9c64d7c84dd7c72516..db70c1b90db7b4a9ceaac228801a5c99cbac5e89 100755 (executable)
@@ -3,22 +3,11 @@
 test_info()
 {
     cat <<EOF
-Verify that the ctdb_transaction test succeeds.
+Verify that the transaction_loop test succeeds with recoveries.
 
 Prerequisites:
 
 * An active CTDB cluster with at least 2 active nodes.
-
-Steps:
-
-1. Verify that the status on all of the ctdb nodes is 'OK'.
-2. Run two copies of ctdb_transaction on each node with a 30 second
-   timeout.
-3. Ensure that all ctdb_transaction processes complete successfully.
-
-Expected results:
-
-* ctdb_transaction runs without error.
 EOF
 }
 
@@ -49,6 +38,8 @@ set -e
 
 cluster_is_healthy
 
+ctdb_restart_when_done
+
 try_command_on_node 0 "$CTDB attach transaction_loop.tdb persistent"
 try_command_on_node 0 "$CTDB wipedb transaction_loop.tdb"
 
@@ -65,6 +56,5 @@ t="$CTDB_TEST_WRAPPER $VALGRIND transaction_loop \
 echo "Starting recovery loop"
 recovery_loop_start
 
-echo "Running ctdb_transaction on all $num_nodes nodes."
+echo "Running transaction_loop on all $num_nodes nodes."
 try_command_on_node -v -p all "$t"
-