Author: jonathan Date: Fri Dec 10 18:23:06 2010 New Revision: 1044468 URL: http://svn.apache.org/viewvc?rev=1044468&view=rev Log: Modified qpid-cluster to support the way it is called from cluster_tests.StoreTests.test_persistent_partial_failure.
Corrected test_persistent_partial_failure so that it no longer sends the name of the script as the first parameter - optparse expects this for arguments from sys.argv, but not for other argument lists. Fixed bug assigning host name. Modified: qpid/trunk/qpid/cpp/src/tests/cluster_tests.py qpid/trunk/qpid/tools/src/py/qpid-cluster 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=1044468&r1=1044467&r2=1044468&view=diff ============================================================================== --- qpid/trunk/qpid/cpp/src/tests/cluster_tests.py (original) +++ qpid/trunk/qpid/cpp/src/tests/cluster_tests.py Fri Dec 10 18:23:06 2010 @@ -435,7 +435,7 @@ class StoreTests(BrokerTest): def stop_cluster(self,broker): """Clean shut-down of a cluster""" self.assertEqual(0, qpid_cluster.main( - ["qpid-cluster", "-kf", broker.host_port()])) + ["-kf", broker.host_port()])) def test_persistent_restart(self): """Verify persistent cluster shutdown/restart scenarios""" Modified: qpid/trunk/qpid/tools/src/py/qpid-cluster URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/tools/src/py/qpid-cluster?rev=1044468&r1=1044467&r2=1044468&view=diff ============================================================================== --- qpid/trunk/qpid/tools/src/py/qpid-cluster (original) +++ qpid/trunk/qpid/tools/src/py/qpid-cluster Fri Dec 10 18:23:06 2010 @@ -232,7 +232,7 @@ class BrokerManager: self.qmf.delBroker(broker) def main(argv=None): - if argv is None: argv = sys.argv + try: config = Config() @@ -247,11 +247,11 @@ def main(argv=None): parser.add_option("-k", "--all-stop", action="store_true", default=False, help="Shut down the whole cluster") parser.add_option("-f", "--force", action="store_true", default=False, help="Suppress the 'are you sure' prompt") parser.add_option("-n", "--numeric", action="store_true", default=False, help="Don't resolve names") - - opts, args = parser.parse_args() + + opts, args = parser.parse_args(args=argv) if args: - _host = args[0] + config._host = args[0] if opts.timeout != 0: config._connTimeout = opts.timeout --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org