From f835fa163dcaec8389bdbc1d6765e6cf5c5151da Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Fri, 25 Feb 2011 20:54:02 +0000 Subject: QPID-3087: add extra test for qpid-config and handling string values in arguments git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1074698 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/cli_tests.py | 20 ++++++++++++++++++++ cpp/src/tests/run_cli_tests | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'cpp/src/tests') diff --git a/cpp/src/tests/cli_tests.py b/cpp/src/tests/cli_tests.py index deef03279d..53c64e055c 100755 --- a/cpp/src/tests/cli_tests.py +++ b/cpp/src/tests/cli_tests.py @@ -365,6 +365,26 @@ class CliTests(TestBase010): self.assertEqual(queue._altExchange_.name, altName) self.assertEqual(found, True) + def test_qpid_config_list_queues_arguments(self): + """ + Test to verify that when the type of a policy limit is + actually a string (though still a valid value), it does not + upset qpid-config + """ + self.startQmf(); + qmf = self.qmf + + names = ["queue_capacity%s" % (i) for i in range(1, 6)] + for name in names: + self.session.queue_declare(queue=name, exclusive=True, + arguments={'qpid.max_count' : str(i), 'qpid.max_size': '100'}) + + output = os.popen(self.qpid_config_command(" queues")).readlines() + queues = [line.split()[0] for line in output[2:len(output)]] #ignore first two lines (header) + + for name in names: + assert name in queues, "%s not in %s" % (name, queues) + def test_qpid_route(self): self.startQmf(); qmf = self.qmf diff --git a/cpp/src/tests/run_cli_tests b/cpp/src/tests/run_cli_tests index 3f1388b9f5..721825e3d9 100755 --- a/cpp/src/tests/run_cli_tests +++ b/cpp/src/tests/run_cli_tests @@ -70,7 +70,8 @@ stop_brokers() { if test -d ${PYTHON_DIR} ; then start_brokers echo "Running CLI tests using brokers on ports $LOCAL_PORT $REMOTE_PORT" - $QPID_PYTHON_TEST -m cli_tests -b localhost:$LOCAL_PORT -Dremote-port=$REMOTE_PORT -Dcli-dir=$CLI_DIR $targs $@ + PYTHON_TESTS=${PYTHON_TESTS:-$*} + $QPID_PYTHON_TEST -m cli_tests -b localhost:$LOCAL_PORT -Dremote-port=$REMOTE_PORT -Dcli-dir=$CLI_DIR $targs $PYTHON_TESTS $@ RETCODE=$? stop_brokers if test x$RETCODE != x0; then -- cgit v1.2.1