Return-Path: X-Original-To: apmail-qpid-commits-archive@www.apache.org Delivered-To: apmail-qpid-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7F9D9D0DD for ; Wed, 15 May 2013 15:05:28 +0000 (UTC) Received: (qmail 33263 invoked by uid 500); 15 May 2013 15:05:28 -0000 Delivered-To: apmail-qpid-commits-archive@qpid.apache.org Received: (qmail 33238 invoked by uid 500); 15 May 2013 15:05:28 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 33229 invoked by uid 99); 15 May 2013 15:05:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 May 2013 15:05:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 May 2013 15:05:27 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 3652723889DA; Wed, 15 May 2013 15:05:06 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1482882 - /qpid/trunk/qpid/cpp/src/tests/ha_tests.py Date: Wed, 15 May 2013 15:05:06 -0000 To: commits@qpid.apache.org From: aconway@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130515150506.3652723889DA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: aconway Date: Wed May 15 15:05:05 2013 New Revision: 1482882 URL: http://svn.apache.org/r1482882 Log: QPID-4745: Clean up test_backup_acquired to use HaCluster. Modified: qpid/trunk/qpid/cpp/src/tests/ha_tests.py Modified: qpid/trunk/qpid/cpp/src/tests/ha_tests.py URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/ha_tests.py?rev=1482882&r1=1482881&r2=1482882&view=diff ============================================================================== --- qpid/trunk/qpid/cpp/src/tests/ha_tests.py (original) +++ qpid/trunk/qpid/cpp/src/tests/ha_tests.py Wed May 15 15:05:05 2013 @@ -412,7 +412,7 @@ class ReplicationTests(HaBrokerTest): def __init__(self, queue, arguments, expect): self.queue = queue self.address = "%s;{create:always,node:{x-declare:{arguments:{%s}}}}"%( - self.queue, ",".join(arguments + ["'qpid.replicate':all"])) + self.queue, ",".join(arguments)) self.expect = [str(i) for i in expect] def send(self, connection): @@ -421,9 +421,6 @@ class ReplicationTests(HaBrokerTest): for m in range(10): s.sender(self.address).send(str(m)) s.receiver(self.address).fetch() - def wait(self, brokertest, backup): - backup.wait_backup(self.queue) - def verify(self, brokertest, backup): backup.assert_browse_backup(self.queue, self.expect, msg=self.queue) @@ -435,20 +432,18 @@ class ReplicationTests(HaBrokerTest): Test("lvq", ["'qpid.last_value_queue_key':lvq-key"], [9]) ] - primary = HaBroker(self, name="primary") - primary.promote() - backup1 = HaBroker(self, name="backup1", brokers_url=primary.host_port()) - c = primary.connect() + cluster = HaCluster(self, 3) + cluster.kill(2, final=False) # restart after messages are sent to test catch-up + + c = cluster[0].connect() for t in tests: t.send(c) # Send messages, leave one unacknowledged. - backup2 = HaBroker(self, name="backup2", brokers_url=primary.host_port()) - # Wait for backups to catch up. - for t in tests: - t.wait(self, backup1) - t.wait(self, backup2) + cluster.restart(2) + cluster[2].wait_status("ready") + # Verify acquired message was replicated - for t in tests: t.verify(self, backup1) - for t in tests: t.verify(self, backup2) + for t in tests: t.verify(self, cluster[1]) + for t in tests: t.verify(self, cluster[2]) def test_replicate_default(self): """Make sure we don't replicate if ha-replicate is unspecified or none""" --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org For additional commands, e-mail: commits-help@qpid.apache.org