diff options
author | Alan Conway <aconway@apache.org> | 2009-11-26 15:56:46 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2009-11-26 15:56:46 +0000 |
commit | c96cb4fa4232b035309ebfc4586a54c0be8fe762 (patch) | |
tree | c846e6d28bd61dba335df166be9a914c4037112d /cpp/src/tests | |
parent | c61e76daedbf2d0dc709d5e49003a930d161a500 (diff) | |
download | qpid-python-c96cb4fa4232b035309ebfc4586a54c0be8fe762.tar.gz |
Cluster consistency: check for no clean store condition.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@884612 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests')
-rwxr-xr-x | cpp/src/tests/cluster_tests.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/cpp/src/tests/cluster_tests.py b/cpp/src/tests/cluster_tests.py index 78967196a9..e57a826000 100755 --- a/cpp/src/tests/cluster_tests.py +++ b/cpp/src/tests/cluster_tests.py @@ -18,7 +18,7 @@ # under the License. # -import os, signal, sys, time, imp +import os, signal, sys, time, imp, re from qpid import datatypes, messaging from qpid.brokertest import * from qpid.harness import Skipped @@ -189,4 +189,17 @@ class StoreTests(BrokerTest): a = cluster.start("a", expect=EXPECT_EXIT_FAIL, wait=False) b = cluster.start("b", expect=EXPECT_EXIT_FAIL, wait=False) - + def test_total_failure(self): + # Verify we abort with sutiable error message if no clean stores. + cluster = self.cluster(0, args=self.args()+["--cluster-size=2"]) + a = cluster.start("a", expect=EXPECT_EXIT_FAIL, wait=False) + b = cluster.start("b", expect=EXPECT_EXIT_FAIL, wait=True) + a.kill() + b.kill() + a = cluster.start("a", expect=EXPECT_EXIT_FAIL, wait=False) + b = cluster.start("b", expect=EXPECT_EXIT_FAIL, wait=False) + assert a.wait() != 0 + assert b.wait() != 0 + msg = re.compile("critical.*no clean store") + assert msg.search(file(a.log).read()) + assert msg.search(file(b.log).read()) |