Author: kgiusti Date: Tue May 1 13:58:06 2012 New Revision: 1332659 URL: http://svn.apache.org/viewvc?rev=1332659&view=rev Log: QPID-3963: fix test, add cluster log filters for link and broker state
Modified: qpid/trunk/qpid/cpp/src/tests/cluster_test_logs.py qpid/trunk/qpid/cpp/src/tests/cluster_tests.py Modified: qpid/trunk/qpid/cpp/src/tests/cluster_test_logs.py URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/cluster_test_logs.py?rev=1332659&r1=1332658&r2=1332659&view=diff ============================================================================== --- qpid/trunk/qpid/cpp/src/tests/cluster_test_logs.py (original) +++ qpid/trunk/qpid/cpp/src/tests/cluster_test_logs.py Tue May 1 13:58:06 2012 @@ -60,11 +60,13 @@ def filter_log(log): 'task late', 'task overran', 'warning CLOSING .* unsent data', - 'Inter-broker link ', + 'Inter-broker link ', # ignore link state changes + 'Updated link key from ', # ignore link state changes 'Running in a cluster, marking store', 'debug Sending keepalive signal to watchdog', # Watchdog timer thread 'last broker standing joined by 1 replicas, updating queue policies.', - 'Connection .* timed out: closing' # heartbeat connection close + 'Connection .* timed out: closing', # heartbeat connection close + "org.apache.qpid.broker:bridge:" # ignore bridge index ]) # Regex to match a UUID uuid='\w\w\w\w\w\w\w\w-\w\w\w\w-\w\w\w\w-\w\w\w\w-\w\w\w\w\w\w\w\w\w\w\w\w' Modified: qpid/trunk/qpid/cpp/src/tests/cluster_tests.py URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/cluster_tests.py?rev=1332659&r1=1332658&r2=1332659&view=diff ============================================================================== --- qpid/trunk/qpid/cpp/src/tests/cluster_tests.py (original) +++ qpid/trunk/qpid/cpp/src/tests/cluster_tests.py Tue May 1 13:58:06 2012 @@ -810,10 +810,10 @@ acl deny all all self.assertTrue(active, "Bridge failed to become active") - # 1 node cluster source, 1 node cluster destination - src_cluster = self.cluster(1, expect=EXPECT_EXIT_FAIL) + # 2 node cluster source, 2 node cluster destination + src_cluster = self.cluster(2, expect=EXPECT_EXIT_FAIL) src_cluster.ready(); - dst_cluster = self.cluster(1, expect=EXPECT_EXIT_FAIL) + dst_cluster = self.cluster(2, expect=EXPECT_EXIT_FAIL) dst_cluster.ready(); cmd = self.popen(["qpid-config", @@ -850,36 +850,39 @@ acl deny all all # check that traffic passes verify(src_cluster[0], "srcQ", dst_cluster[0], "destQ") - # add src[1] and src[2] brokers to source cluster - src_cluster.start(expect=EXPECT_EXIT_FAIL); - src_cluster.ready(); + # add src[2] broker to source cluster src_cluster.start(expect=EXPECT_EXIT_FAIL); src_cluster.ready(); verify(src_cluster[2], "srcQ", dst_cluster[0], "destQ") - # Kill src[0]. dst[0] should've learned about src[1,2] + # Kill src[0]. dst[0] should fail over to src[1] src_cluster[0].kill() for b in src_cluster[1:]: b.ready() verify(src_cluster[1], "srcQ", dst_cluster[0], "destQ") - # Kill src[1], dst[0] should still be connected + # Kill src[1], dst[0] should fail over to src[2] src_cluster[1].kill() for b in src_cluster[2:]: b.ready() verify(src_cluster[2], "srcQ", dst_cluster[0], "destQ") - # Add dest[1] - # dest[0] syncs dest[1] to current remote state - dst_cluster.start(expect=EXPECT_EXIT_FAIL); - dst_cluster.ready(); - verify(src_cluster[2], "srcQ", dst_cluster[1], "destQ") - # Kill dest[0], force failover to dest[1] dst_cluster[0].kill() for b in dst_cluster[1:]: b.ready() verify(src_cluster[2], "srcQ", dst_cluster[1], "destQ") + # Add dest[2] + # dest[1] syncs dest[2] to current remote state + dst_cluster.start(expect=EXPECT_EXIT_FAIL); + for b in dst_cluster[1:]: b.ready() + verify(src_cluster[2], "srcQ", dst_cluster[1], "destQ") + + # Kill dest[1], force failover to dest[2] + dst_cluster[1].kill() + for b in dst_cluster[2:]: b.ready() + verify(src_cluster[2], "srcQ", dst_cluster[2], "destQ") + for i in range(2, len(src_cluster)): src_cluster[i].kill() - for i in range(1, len(dst_cluster)): dst_cluster[i].kill() + for i in range(2, len(dst_cluster)): dst_cluster[i].kill() # Some utility code for transaction tests --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org