diff options
author | Alan Conway <aconway@apache.org> | 2012-12-19 21:24:56 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2012-12-19 21:24:56 +0000 |
commit | 0e7dd521a2e7f420ef82f812b60f9f31e8206cf3 (patch) | |
tree | cb162b64d40a51d9c15fa875f5cab1aa624c319f /qpid/cpp/src | |
parent | c0481d290339ee4f1747add7955ae107cc5560d1 (diff) | |
download | qpid-python-0e7dd521a2e7f420ef82f812b60f9f31e8206cf3.tar.gz |
QPID-4514: Remove obsolete cluster code: still more tests
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1424141 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r-- | qpid/cpp/src/tests/CMakeLists.txt | 2 | ||||
-rw-r--r-- | qpid/cpp/src/tests/ForkedBroker.cpp | 157 | ||||
-rw-r--r-- | qpid/cpp/src/tests/ForkedBroker.h | 82 | ||||
-rw-r--r-- | qpid/cpp/src/tests/InitialStatusMap.cpp | 239 | ||||
-rw-r--r-- | qpid/cpp/src/tests/Makefile.am | 4 | ||||
-rw-r--r-- | qpid/cpp/src/tests/PartialFailure.cpp | 291 | ||||
-rwxr-xr-x | qpid/cpp/src/tests/benchmark | 95 | ||||
-rwxr-xr-x | qpid/cpp/src/tests/cpg_check.sh.in | 38 | ||||
-rwxr-xr-x | qpid/cpp/src/tests/federation_sys.py | 1251 | ||||
-rwxr-xr-x | qpid/cpp/src/tests/ipv6_test | 40 | ||||
-rwxr-xr-x | qpid/cpp/src/tests/run_failover_soak | 39 | ||||
-rwxr-xr-x | qpid/cpp/src/tests/run_federation_sys_tests | 28 | ||||
-rwxr-xr-x | qpid/cpp/src/tests/ssl_test | 26 | ||||
-rw-r--r-- | qpid/cpp/src/tests/test_env.sh.in | 2 |
14 files changed, 168 insertions, 2126 deletions
diff --git a/qpid/cpp/src/tests/CMakeLists.txt b/qpid/cpp/src/tests/CMakeLists.txt index 63afc46831..803ba48a45 100644 --- a/qpid/cpp/src/tests/CMakeLists.txt +++ b/qpid/cpp/src/tests/CMakeLists.txt @@ -340,7 +340,7 @@ add_library (dlclose_noop MODULE dlclose_noop.c) # ## Longer running stability tests, not run by default check: target. ## Not run under valgrind, too slow -#LONG_TESTS=fanout_perftest shared_perftest multiq_perftest topic_perftest run_failover_soak +#LONG_TESTS=fanout_perftest shared_perftest multiq_perftest topic_perftest #EXTRA_DIST+=$(LONG_TESTS) run_perftest #check-long: # $(MAKE) check TESTS="start_broker $(LONG_TESTS) stop_broker" VALGRIND= diff --git a/qpid/cpp/src/tests/ForkedBroker.cpp b/qpid/cpp/src/tests/ForkedBroker.cpp deleted file mode 100644 index de1b42d40f..0000000000 --- a/qpid/cpp/src/tests/ForkedBroker.cpp +++ /dev/null @@ -1,157 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "ForkedBroker.h" -#include "qpid/log/Statement.h" -#include <boost/bind.hpp> -#include <algorithm> -#include <stdlib.h> -#include <sys/types.h> -#include <signal.h> - -using namespace std; -using qpid::ErrnoException; - -namespace std { -static ostream& operator<<(ostream& o, const qpid::tests::ForkedBroker::Args& a) { -copy(a.begin(), a.end(), ostream_iterator<string>(o, " ")); -return o; -} -} - -namespace qpid { -namespace tests { - -ForkedBroker::ForkedBroker(const Args& constArgs) : running(false), exitStatus(0) { - Args args(constArgs); - // Substitute the special value "TMP_DATA_DIR" with a temporary data dir. - Args::iterator i = find(args.begin(), args.end(), string("TMP_DATA_DIR")); - if (i != args.end()) { - args.erase(i); - char dd[] = "/tmp/ForkedBroker.XXXXXX"; - if (!mkdtemp(dd)) - throw qpid::ErrnoException("Can't create data dir"); - dataDir = dd; - args.push_back("--data-dir"); - args.push_back(dataDir); - } - // Never use the default data directory, set --no-data-dir if no other data-dir arg. - Args::iterator j = find(args.begin(), args.end(), string("--data-dir")); - Args::iterator k = find(args.begin(), args.end(), string("--no-data-dir")); - if (j == args.end() && k == args.end()) - args.push_back("--no-data-dir"); - init(args); -} - -ForkedBroker::~ForkedBroker() { - try { kill(); } - catch (const std::exception& e) { - QPID_LOG(error, QPID_MSG("Killing forked broker: " << e.what())); - } - if (!dataDir.empty()) - { - if(::system(("rm -rf "+dataDir).c_str())) {} - } -} - -void ForkedBroker::kill(int sig) { - if (pid == 0) return; - int savePid = pid; - pid = 0; // Reset pid here in case of an exception. - using qpid::ErrnoException; - if (::kill(savePid, sig) < 0) - throw ErrnoException("kill failed"); - int status; - if (::waitpid(savePid, &status, 0) < 0 && sig != 9) - throw ErrnoException("wait for forked process failed"); - if (WEXITSTATUS(status) != 0 && sig != 9) - throw qpid::Exception(QPID_MSG("Forked broker exited with: " << WEXITSTATUS(status))); - running = false; - exitStatus = status; -} - -bool isLogOption(const std::string& s) { - const char * log_enable = "--log-enable", - * trace = "--trace"; - return( (! strncmp(s.c_str(), log_enable, strlen(log_enable))) || - (! strncmp(s.c_str(), trace, strlen(trace))) - ); -} - -namespace { - void ignore_signal(int) - { - } -} - -void ForkedBroker::init(const Args& userArgs) { - using qpid::ErrnoException; - port = 0; - int pipeFds[2]; - if(::pipe(pipeFds) < 0) throw ErrnoException("Can't create pipe"); - - // Ignore the SIGCHLD signal generated by an exitting child - // We will clean up any exitting children in the waitpid above - // This should really be neater (like only once not per fork) - struct ::sigaction sa; - sa.sa_handler = ignore_signal; - ::sigemptyset(&sa.sa_mask); - ::sigaddset(&sa.sa_mask, SIGCHLD); - sa.sa_flags = SA_NOCLDSTOP | SA_RESTART; - ::sigaction(SIGCHLD, &sa, 0); - - pid = ::fork(); - if (pid < 0) throw ErrnoException("Fork failed"); - if (pid) { // parent - ::close(pipeFds[1]); - FILE* f = ::fdopen(pipeFds[0], "r"); - if (!f) throw ErrnoException("fopen failed"); - if (::fscanf(f, "%d", &port) != 1) { - if (ferror(f)) throw ErrnoException("Error reading port number from child."); - else throw qpid::Exception("EOF reading port number from child."); - } - ::fclose(f); - running = true; - } - else { // child - ::close(pipeFds[0]); - int fd = ::dup2(pipeFds[1], 1); // pipe stdout to the parent. - if (fd < 0) throw ErrnoException("dup2 failed"); - const char* prog = ::getenv("QPIDD_EXEC"); - if (!prog) prog = "../qpidd"; // This only works from within svn checkout - Args args(userArgs); - args.push_back("--port=0"); - // Keep quiet except for errors. - if (!::getenv("QPID_TRACE") && !::getenv("QPID_LOG_ENABLE") - && find_if(userArgs.begin(), userArgs.end(), isLogOption) == userArgs.end()) - args.push_back("--log-enable=error+"); - std::vector<const char*> argv(args.size()); - std::transform(args.begin(), args.end(), argv.begin(), boost::bind(&std::string::c_str, _1)); - argv.push_back(0); - QPID_LOG(debug, "ForkedBroker exec " << prog << ": " << args); - - execv(prog, const_cast<char* const*>(&argv[0])); - QPID_LOG(critical, "execv failed to start broker: prog=\"" << prog << "\"; args=\"" << args << "\"; errno=" << errno << " (" << std::strerror(errno) << ")"); - ::exit(1); - } -} - -}} // namespace qpid::tests diff --git a/qpid/cpp/src/tests/ForkedBroker.h b/qpid/cpp/src/tests/ForkedBroker.h deleted file mode 100644 index 87e141a425..0000000000 --- a/qpid/cpp/src/tests/ForkedBroker.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef TESTS_FORKEDBROKER_H -#define TESTS_FORKEDBROKER_H - - -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "qpid/Exception.h" -#include "qpid/log/Statement.h" -#include "qpid/broker/Broker.h" -#include <boost/lexical_cast.hpp> -#include <string> -#include <stdio.h> -#include <sys/wait.h> - -namespace qpid { -namespace tests { - -/** - * Class to fork a broker child process. - * - * For most tests a BrokerFixture may be more convenient as it starts - * a broker in the same process which allows you to easily debug into - * the broker. - * - * This useful for tests that need to start multiple brokers where - * those brokers can't coexist in the same process (e.g. for cluster - * tests where CPG doesn't allow multiple group members in a single - * process.) - * - */ -class ForkedBroker { - public: - typedef std::vector<std::string> Args; - - // argv args are passed to broker. - // - // Special value "TMP_DATA_DIR" is substituted with a temporary - // data directory for the broker. - // - ForkedBroker(const Args& argv); - ~ForkedBroker(); - - void kill(int sig=SIGINT); - int wait(); // Wait for exit, return exit status. - uint16_t getPort() { return port; } - pid_t getPID() { return pid; } - bool isRunning() { return running; } - - private: - - void init(const Args& args); - - bool running; - int exitStatus; - - pid_t pid; - int port; - std::string dataDir; -}; - -}} // namespace qpid::tests - -#endif /*!TESTS_FORKEDBROKER_H*/ diff --git a/qpid/cpp/src/tests/InitialStatusMap.cpp b/qpid/cpp/src/tests/InitialStatusMap.cpp deleted file mode 100644 index 95806737e3..0000000000 --- a/qpid/cpp/src/tests/InitialStatusMap.cpp +++ /dev/null @@ -1,239 +0,0 @@ -/* - * - * Copyright (c) 2006 The Apache Software Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - - -#include "unit_test.h" -#include "test_tools.h" -#include "qpid/cluster/InitialStatusMap.h" -#include "qpid/framing/Uuid.h" -#include <boost/assign.hpp> - -using namespace std; -using namespace qpid::cluster; -using namespace qpid::framing; -using namespace qpid::framing::cluster; -using namespace boost::assign; - -namespace qpid { -namespace tests { - -QPID_AUTO_TEST_SUITE(InitialStatusMapTestSuite) - -typedef InitialStatusMap::Status Status; - -Status activeStatus(const Uuid& id=Uuid(), const MemberSet& ms=MemberSet(), - const framing::Array& urls=framing::Array()) -{ - return Status(ProtocolVersion(), 0, true, id, STORE_STATE_NO_STORE, Uuid(), - encodeMemberSet(ms), urls); -} - -Status newcomerStatus(const Uuid& id=Uuid(), const MemberSet& ms=MemberSet(), - const framing::Array& urls=framing::Array()) -{ - return Status(ProtocolVersion(), 0, false, id, STORE_STATE_NO_STORE, Uuid(), - encodeMemberSet(ms), urls); -} - -Status storeStatus(bool active, StoreState state, Uuid start=Uuid(), Uuid stop=Uuid(), - const MemberSet& ms=MemberSet(), const framing::Array& urls=framing::Array()) -{ - return Status(ProtocolVersion(), 0, active, start, state, stop, - encodeMemberSet(ms), urls); -} - -QPID_AUTO_TEST_CASE(testFirstInCluster) { - // Single member is first in cluster. - InitialStatusMap map(MemberId(0), 1); - Uuid id(true); - BOOST_CHECK(!map.isComplete()); - MemberSet members = list_of(MemberId(0)); - map.configChange(members); - BOOST_CHECK(!map.isComplete()); - map.received(MemberId(0), newcomerStatus(id, list_of<MemberId>(0))); - BOOST_CHECK(map.isComplete()); - BOOST_CHECK(map.transitionToComplete()); - BOOST_CHECK(map.getElders().empty()); - BOOST_CHECK(!map.isUpdateNeeded()); - BOOST_CHECK_EQUAL(id, map.getClusterId()); -} - -QPID_AUTO_TEST_CASE(testJoinExistingCluster) { - // Single member 0 joins existing cluster 1,2 - InitialStatusMap map(MemberId(0), 1); - Uuid id(true); - MemberSet members = list_of(MemberId(0))(MemberId(1))(MemberId(2)); - map.configChange(members); - BOOST_CHECK(map.isResendNeeded()); - BOOST_CHECK(!map.isComplete()); - map.received(MemberId(0), newcomerStatus()); - map.received(MemberId(1), activeStatus(id)); - BOOST_CHECK(!map.isComplete()); - map.received(MemberId(2), activeStatus(id)); - BOOST_CHECK(map.isComplete()); - BOOST_CHECK(map.transitionToComplete()); - BOOST_CHECK_EQUAL(map.getElders(), list_of<MemberId>(1)(2)); - BOOST_CHECK(map.isUpdateNeeded()); - BOOST_CHECK_EQUAL(map.getClusterId(), id); - - // Check that transitionToComplete is reset. - map.configChange(list_of<MemberId>(0)(1)); - BOOST_CHECK(!map.transitionToComplete()); -} - -QPID_AUTO_TEST_CASE(testMultipleFirstInCluster) { - // Multiple members 0,1,2 join at same time. - InitialStatusMap map(MemberId(1), 1); // self is 1 - Uuid id(true); - MemberSet members = list_of(MemberId(0))(MemberId(1))(MemberId(2)); - map.configChange(members); - BOOST_CHECK(map.isResendNeeded()); - - // All new members - map.received(MemberId(0), newcomerStatus(id, list_of<MemberId>(0)(1)(2))); - map.received(MemberId(1), newcomerStatus(id, list_of<MemberId>(0)(1)(2))); - map.received(MemberId(2), newcomerStatus(id, list_of<MemberId>(0)(1)(2))); - BOOST_CHECK(!map.isResendNeeded()); - BOOST_CHECK(map.isComplete()); - BOOST_CHECK(map.transitionToComplete()); - BOOST_CHECK_EQUAL(map.getElders(), list_of(MemberId(2))); - BOOST_CHECK(!map.isUpdateNeeded()); - BOOST_CHECK_EQUAL(map.getClusterId(), id); -} - -QPID_AUTO_TEST_CASE(testMultipleJoinExisting) { - // Multiple members 2,3 join simultaneously a cluster containing 0,1. - InitialStatusMap map(MemberId(2), 1); // self is 2 - Uuid id(true); - MemberSet members = list_of(MemberId(0))(MemberId(1))(MemberId(2))(MemberId(3)); - map.configChange(members); - BOOST_CHECK(map.isResendNeeded()); - map.received(MemberId(0), activeStatus(id, list_of<MemberId>(0))); - map.received(MemberId(1), newcomerStatus(id, list_of<MemberId>(0)(1))); - map.received(MemberId(2), newcomerStatus(id, list_of<MemberId>(0)(1)(2)(3))); - map.received(MemberId(3), newcomerStatus(id, list_of<MemberId>(0)(1)(2)(3))); - BOOST_CHECK(!map.isResendNeeded()); - BOOST_CHECK(map.isComplete()); - BOOST_CHECK(map.transitionToComplete()); - BOOST_CHECK_EQUAL(map.getElders(), list_of<MemberId>(0)(1)(3)); - BOOST_CHECK(map.isUpdateNeeded()); - BOOST_CHECK_EQUAL(map.getClusterId(), id); -} - -QPID_AUTO_TEST_CASE(testMembersLeave) { - // Test that map completes if members leave rather than send status. - InitialStatusMap map(MemberId(0), 1); - Uuid id(true); - map.configChange(list_of(MemberId(0))(MemberId(1))(MemberId(2))); - map.received(MemberId(0), newcomerStatus()); - map.received(MemberId(1), activeStatus(id)); - BOOST_CHECK(!map.isComplete()); - map.configChange(list_of(MemberId(0))(MemberId(1))); // 2 left - BOOST_CHECK(map.isComplete()); - BOOST_CHECK(map.transitionToComplete()); - BOOST_CHECK_EQUAL(map.getElders(), list_of(MemberId(1))); - BOOST_CHECK_EQUAL(map.getClusterId(), id); -} - -QPID_AUTO_TEST_CASE(testInteveningConfig) { - // Multiple config changes arrives before we complete the map. - InitialStatusMap map(MemberId(0), 1); - Uuid id(true); - - map.configChange(list_of<MemberId>(0)(1)); - BOOST_CHECK(map.isResendNeeded()); - map.received(MemberId(0), newcomerStatus()); - BOOST_CHECK(!map.isComplete()); - BOOST_CHECK(!map.isResendNeeded()); - // New member 2 joins before we receive 1 - map.configChange(list_of<MemberId>(0)(1)(2)); - BOOST_CHECK(!map.isComplete()); - BOOST_CHECK(map.isResendNeeded()); - map.received(1, activeStatus(id)); - map.received(2, newcomerStatus()); - // We should not be complete as we haven't received 0 since new member joined - BOOST_CHECK(!map.isComplete()); - BOOST_CHECK(!map.isResendNeeded()); - - map.received(0, newcomerStatus()); - BOOST_CHECK(map.isComplete()); - BOOST_CHECK(map.transitionToComplete()); - BOOST_CHECK_EQUAL(map.getElders(), list_of<MemberId>(1)); - BOOST_CHECK_EQUAL(map.getClusterId(), id); -} - -QPID_AUTO_TEST_CASE(testAllCleanNoUpdate) { - InitialStatusMap map(MemberId(0), 3); - map.configChange(list_of<MemberId>(0)(1)(2)); - map.received(MemberId(0), storeStatus(false, STORE_STATE_CLEAN_STORE)); - map.received(MemberId(1), storeStatus(false, STORE_STATE_CLEAN_STORE)); - map.received(MemberId(2), storeStatus(false, STORE_STATE_CLEAN_STORE)); - BOOST_CHECK(!map.isUpdateNeeded()); -} - -QPID_AUTO_TEST_CASE(testAllEmptyNoUpdate) { - InitialStatusMap map(MemberId(0), 3); - map.configChange(list_of<MemberId>(0)(1)(2)); - map.received(MemberId(0), storeStatus(false, STORE_STATE_EMPTY_STORE)); - map.received(MemberId(1), storeStatus(false, STORE_STATE_EMPTY_STORE)); - map.received(MemberId(2), storeStatus(false, STORE_STATE_EMPTY_STORE)); - BOOST_CHECK(map.isComplete()); - BOOST_CHECK(!map.isUpdateNeeded()); -} - -QPID_AUTO_TEST_CASE(testAllNoStoreNoUpdate) { - InitialStatusMap map(MemberId(0), 3); - map.configChange(list_of<MemberId>(0)(1)(2)); - map.received(MemberId(0), storeStatus(false, STORE_STATE_NO_STORE)); - map.received(MemberId(1), storeStatus(false, STORE_STATE_NO_STORE)); - map.received(MemberId(2), storeStatus(false, STORE_STATE_NO_STORE)); - BOOST_CHECK(map.isComplete()); - BOOST_CHECK(!map.isUpdateNeeded()); -} - -QPID_AUTO_TEST_CASE(testDirtyNeedUpdate) { - InitialStatusMap map(MemberId(0), 3); - map.configChange(list_of<MemberId>(0)(1)(2)); - map.received(MemberId(0), storeStatus(false, STORE_STATE_DIRTY_STORE)); - map.received(MemberId(1), storeStatus(false, STORE_STATE_CLEAN_STORE)); - map.received(MemberId(2), storeStatus(false, STORE_STATE_CLEAN_STORE)); - BOOST_CHECK(map.transitionToComplete()); - BOOST_CHECK(map.isUpdateNeeded()); -} - -QPID_AUTO_TEST_CASE(testEmptyNeedUpdate) { - InitialStatusMap map(MemberId(0), 3); - map.configChange(list_of<MemberId>(0)(1)(2)); - map.received(MemberId(0), storeStatus(false, STORE_STATE_EMPTY_STORE)); - map.received(MemberId(1), storeStatus(false, STORE_STATE_CLEAN_STORE)); - map.received(MemberId(2), storeStatus(false, STORE_STATE_CLEAN_STORE)); - BOOST_CHECK(map.transitionToComplete()); - BOOST_CHECK(map.isUpdateNeeded()); -} - -QPID_AUTO_TEST_CASE(testEmptyAlone) { - InitialStatusMap map(MemberId(0), 1); - map.configChange(list_of<MemberId>(0)); - map.received(MemberId(0), storeStatus(false, STORE_STATE_EMPTY_STORE)); - BOOST_CHECK(map.transitionToComplete()); - BOOST_CHECK(!map.isUpdateNeeded()); -} - -QPID_AUTO_TEST_SUITE_END() - -}} // namespace qpid::tests diff --git a/qpid/cpp/src/tests/Makefile.am b/qpid/cpp/src/tests/Makefile.am index e7fe611696..ad4ff383c2 100644 --- a/qpid/cpp/src/tests/Makefile.am +++ b/qpid/cpp/src/tests/Makefile.am @@ -108,8 +108,6 @@ unit_test_SOURCES= unit_test.cpp unit_test.h \ TopicExchangeTest.cpp \ TxBufferTest.cpp \ ConnectionOptions.h \ - ForkedBroker.h \ - ForkedBroker.cpp \ ManagementTest.cpp \ MessageReplayTracker.cpp \ ConsoleTest.cpp \ @@ -314,7 +312,6 @@ EXTRA_DIST += \ ssl_test \ ping_broker \ config.null \ - cpg_check.sh.in \ run_federation_tests \ run_federation_sys_tests \ run_long_federation_sys_tests \ @@ -370,7 +367,6 @@ EXTRA_DIST+= \ shared_perftest \ multiq_perftest \ topic_perftest \ - run_failover_soak \ sasl_test_setup.sh \ run_msg_group_tests_soak \ qpidd-empty.conf diff --git a/qpid/cpp/src/tests/PartialFailure.cpp b/qpid/cpp/src/tests/PartialFailure.cpp deleted file mode 100644 index 63ee28017a..0000000000 --- a/qpid/cpp/src/tests/PartialFailure.cpp +++ /dev/null @@ -1,291 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -/**@file Tests for partial failure in a cluster. - * Partial failure means some nodes experience a failure while others do not. - * In this case the failed nodes must shut down. - */ - -#include "test_tools.h" -#include "unit_test.h" -#include "ClusterFixture.h" -#include <boost/assign.hpp> -#include <boost/algorithm/string.hpp> -#include <boost/bind.hpp> - -namespace qpid { -namespace tests { - -QPID_AUTO_TEST_SUITE(PartialFailureTestSuite) - -using namespace std; -using namespace qpid; -using namespace qpid::cluster; -using namespace qpid::framing; -using namespace qpid::client; -using namespace qpid::client::arg; -using namespace boost::assign; -using broker::Broker; -using boost::shared_ptr; - -// Timeout for tests that wait for messages -const sys::Duration TIMEOUT=sys::TIME_SEC/4; - -static bool isLogOption(const std::string& s) { return boost::starts_with(s, "--log-enable"); } - -void updateArgs(ClusterFixture::Args& args, size_t index) { - ostringstream clusterLib, testStoreLib, storeName; - clusterLib << getLibPath("CLUSTER_LIB"); - testStoreLib << getLibPath("TEST_STORE_LIB"); - storeName << "s" << index; - args.push_back("--auth"); - args.push_back("no"); - args.push_back("--no-module-dir"); - args.push_back("--load-module"); - args.push_back(clusterLib.str()); - args.push_back("--load-module"); - args.push_back(testStoreLib.str()); - args.push_back("--test-store-name"); - args.push_back(storeName.str()); - args.push_back("TMP_DATA_DIR"); - - // These tests generate errors deliberately, disable error logging unless a log env var is set. - if (!::getenv("QPID_TRACE") && !::getenv("QPID_LOG_ENABLE")) { - remove_if(args.begin(), args.end(), isLogOption); - args.push_back("--log-enable=critical+:DISABLED"); // hacky way to disable logs. - } -} - -Message pMessage(string data, string q) { - Message msg(data, q); - msg.getDeliveryProperties().setDeliveryMode(PERSISTENT); - return msg; -} - -void queueAndSub(Client& c) { - c.session.queueDeclare(c.name, durable=true); - c.subs.subscribe(c.lq, c.name); -} - -// Handle near-simultaneous errors -QPID_AUTO_TEST_CASE(testCoincidentErrors) { - ClusterFixture cluster(2, updateArgs, -1); - Client c0(cluster[0], "c0"); - Client c1(cluster[1], "c1"); - - c0.session.queueDeclare("q", durable=true); - { - ScopedSuppressLogging allQuiet; - async(c0.session).messageTransfer(content=pMessage("TEST_STORE_DO: s0[exception]", "q")); - async(c1.session).messageTransfer(content=pMessage("TEST_STORE_DO: s1[exception]", "q")); - - int alive=0; - try { Client c00(cluster[0], "c00"); ++alive; c00.close(); } catch (...) {} - try { Client c11(cluster[1], "c11"); ++alive; c11.close(); } catch (...) {} - - BOOST_CHECK_EQUAL(alive, 1); - - // Close inside ScopedSuppressLogging to avoid warnings - c0.close(); - c1.close(); - } -} - -// Verify normal cluster-wide errors. -QPID_AUTO_TEST_CASE(testNormalErrors) { - // FIXME aconway 2009-04-10: Would like to put a scope just around - // the statements expected to fail (in BOOST_CHECK_yTHROW) but that - // sproadically lets out messages, possibly because they're in - // Connection thread. - - ClusterFixture cluster(3, updateArgs, -1); - Client c0(cluster[0], "c0"); - Client c1(cluster[1], "c1"); - Client c2(cluster[2], "c2"); - - { - ScopedSuppressLogging allQuiet; - queueAndSub(c0); - c0.session.messageTransfer(content=Message("x", "c0")); - BOOST_CHECK_EQUAL(c0.lq.get(TIMEOUT).getData(), "x"); - - // Session error. - BOOST_CHECK_THROW(c0.session.exchangeBind(), SessionException); - c1.session.messageTransfer(content=Message("stay", "c0")); // Will stay on queue, session c0 is dead. - - // Connection error, kill c1 on all members. - queueAndSub(c1); - BOOST_CHECK_THROW( - c1.session.messageTransfer( - content=pMessage("TEST_STORE_DO: s0[exception] s1[exception] s2[exception] testNormalErrors", "c1")), - ConnectionException); - c2.session.messageTransfer(content=Message("stay", "c1")); // Will stay on queue, session/connection c1 is dead. - - BOOST_CHECK_EQUAL(3u, knownBrokerPorts(c2.connection, 3).size()); - BOOST_CHECK_EQUAL(c2.subs.get("c0", TIMEOUT).getData(), "stay"); - BOOST_CHECK_EQUAL(c2.subs.get("c1", TIMEOUT).getData(), "stay"); - - // Close inside ScopedSuppressLogging to avoid warnings - c0.close(); - c1.close(); - c2.close(); - } -} - - -// Test errors after a new member joins to verify frame-sequence-numbers are ok in update. -QPID_AUTO_TEST_CASE(testErrorAfterJoin) { - ClusterFixture cluster(1, updateArgs, -1); - Client c0(cluster[0]); - { - ScopedSuppressLogging allQuiet; - - c0.session.queueDeclare("q", durable=true); - c0.session.messageTransfer(content=pMessage("a", "q")); - - // Kill the new guy - cluster.add(); - Client c1(cluster[1]); - c0.session.messageTransfer(content=pMessage("TEST_STORE_DO: s1[exception] testErrorAfterJoin", "q")); - BOOST_CHECK_THROW(c1.session.messageTransfer(content=pMessage("xxx", "q")), TransportFailure); - BOOST_CHECK_EQUAL(1u, knownBrokerPorts(c0.connection, 1).size()); - - // Kill the old guy - cluster.add(); - Client c2(cluster[2]); - c2.session.messageTransfer(content=pMessage("TEST_STORE_DO: s0[exception] testErrorAfterJoin2", "q")); - BOOST_CHECK_THROW(c0.session.messageTransfer(content=pMessage("xxx", "q")), TransportFailure); - - BOOST_CHECK_EQUAL(1u, knownBrokerPorts(c2.connection, 1).size()); - - // Close inside ScopedSuppressLogging to avoid warnings - c0.close(); - c1.close(); - c2.close(); - } -} - -// Test that if one member fails and others do not, the failure leaves the cluster. -QPID_AUTO_TEST_CASE(testSinglePartialFailure) { - ClusterFixture cluster(3, updateArgs, -1); - Client c0(cluster[0], "c0"); - Client c1(cluster[1], "c1"); - Client c2(cluster[2], "c2"); - - { - ScopedSuppressLogging allQuiet; - - c0.session.queueDeclare("q", durable=true); - c0.session.messageTransfer(content=pMessage("a", "q")); - // Cause partial failure on c1 - c0.session.messageTransfer(content=pMessage("TEST_STORE_DO: s1[exception] testSinglePartialFailure", "q")); - BOOST_CHECK_THROW(c1.session.queueQuery("q"), TransportFailure); - - c0.session.messageTransfer(content=pMessage("b", "q")); - BOOST_CHECK_EQUAL(c0.session.queueQuery("q").getMessageCount(), 3u); - BOOST_CHECK_EQUAL(2u, knownBrokerPorts(c0.connection, 2).size()); - - // Cause partial failure on c2 - c0.session.messageTransfer(content=pMessage("TEST_STORE_DO: s2[exception] testSinglePartialFailure2", "q")); - BOOST_CHECK_THROW(c2.session.queueQuery("q"), TransportFailure); - - c0.session.messageTransfer(content=pMessage("c", "q")); - BOOST_CHECK_EQUAL(c0.session.queueQuery("q").getMessageCount(), 5u); - BOOST_CHECK_EQUAL(1u, knownBrokerPorts(c0.connection, 1).size()); - - // Close inside ScopedSuppressLogging to avoid warnings - c0.close(); - c1.close(); - c2.close(); - } -} - -// Test multiple partial falures: 2 fail 2 pass -QPID_AUTO_TEST_CASE(testMultiPartialFailure) { - ClusterFixture cluster(4, updateArgs, -1); - Client c0(cluster[0], "c0"); - Client c1(cluster[1], "c1"); - Client c2(cluster[2], "c2"); - Client c3(cluster[3], "c3"); - - { - ScopedSuppressLogging allQuiet; - - c0.session.queueDeclare("q", durable=true); - c0.session.messageTransfer(content=pMessage("a", "q")); - - // Cause partial failure on c1, c2 - c0.session.messageTransfer(content=pMessage("TEST_STORE_DO: s1[exception] s2[exception] testMultiPartialFailure", "q")); - BOOST_CHECK_THROW(c1.session.queueQuery("q"), TransportFailure); - BOOST_CHECK_THROW(c2.session.queueQuery("q"), TransportFailure); - - c0.session.messageTransfer(content=pMessage("b", "q")); - c3.session.messageTransfer(content=pMessage("c", "q")); - BOOST_CHECK_EQUAL(c3.session.queueQuery("q").getMessageCount(), 4u); - // FIXME aconway 2009-06-30: This check fails sporadically with 2 != 3. - // It should pass reliably. - // BOOST_CHECK_EQUAL(2u, knownBrokerPorts(c0.connection, 2).size()); - - // Close inside ScopedSuppressLogging to avoid warnings - c0.close(); - c1.close(); - c2.close(); - c3.close(); - } -} - -/** FIXME aconway 2009-04-10: - * The current approach to shutting down a process in test_store - * sometimes leads to assertion failures and errors in the shut-down - * process. Need a cleaner solution - */ -#if 0 -QPID_AUTO_TEST_CASE(testPartialFailureMemberLeaves) { - ClusterFixture cluster(2, updateArgs, -1); - Client c0(cluster[0], "c0"); - Client c1(cluster[1], "c1"); - - { - ScopedSuppressLogging allQuiet; - - c0.session.queueDeclare("q", durable=true); - c0.session.messageTransfer(content=pMessage("a", "q")); - - // Cause failure on member 0 and simultaneous crash on member 1. - BOOST_CHECK_THROW( - c0.session.messageTransfer( - content=pMessage("TEST_STORE_DO: s0[exception] s1[exit_process] testPartialFailureMemberLeaves", "q")), - ConnectionException); - cluster.wait(1); - - Client c00(cluster[0], "c00"); // Old connection is dead. - BOOST_CHECK_EQUAL(c00.session.queueQuery("q").getMessageCount(), 1u); - BOOST_CHECK_EQUAL(1u, knownBrokerPorts(c00.connection, 1).size()); - - // Close inside ScopedSuppressLogging to avoid warnings - c0.close(); - } -} -#endif - -QPID_AUTO_TEST_SUITE_END() - -}} // namespace qpid::tests diff --git a/qpid/cpp/src/tests/benchmark b/qpid/cpp/src/tests/benchmark deleted file mode 100755 index c075837847..0000000000 --- a/qpid/cpp/src/tests/benchmark +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/sh -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# A basic "benchmark" to generate performacne samples of throughput -# and latency against a single cluster member while they are replicating. -# -# Must be run in the qpid src/tests build directory. -# - -usage() { -cat <<EOF -Usage: $0 [options] -- client hosts --- broker hosts -Read the script for options. -EOF -} -# Defaults -TESTDIR=${TESTDIR:-$PWD} # Absolute path to test exes on all hosts. -SCRIPTDIR=${SCRIPTDIR:-`dirname $0`} # Path to local test scripts directory. -SAMPLES=10 # Runs of each test. -COUNT=${COUNT:-10000} # Count for pub/sub tests. -SIZE=${SIZE:-600} # Size of messages -ECHO=${ECHO:-1000} # Count for echo test. -NSUBS=${NSUBS:-4} -NPUBS=${NPUBS:-4} - -collect() { eval $COLLECT=\""\$$COLLECT $*"\"; } -COLLECT=ARGS -while test $# -gt 0; do - case $1 in - --testdir) TESTDIR=$2 ; shift 2 ;; - --samples) SAMPLES=$2 ; shift 2 ;; - --count) COUNT=$2 ; shift 2 ;; - --echos) ECHO=$2 ; shift 2 ;; - --size) SIZE=$2 ; shift 2 ;; - --nsubs) NSUBS=$2 ; shift 2 ;; - --npubs) NPUBS=$2 ; shift 2 ;; - --) COLLECT=CLIENTARG; shift ;; - ---) COLLECT=BROKERARG; shift;; - *) collect $1; shift ;; - esac -done - -CLIENTS=${CLIENTARG:-$CLIENTS} -BROKERS=${BROKERARG:-$BROKERS} -test -z "$CLIENTS" && { echo "Must specify at least one client host."; exit 1; } -test -z "$BROKERS" && { echo "Must specify at least one broker host."; exit 1; } - -export TESTDIR # For perfdist -CLIENTS=($CLIENTS) # Convert to array -BROKERS=($BROKERS) -trap "rm -f $FILES" EXIT - -dosamples() { - FILE=`mktemp` - FILES="$FILES $FILE" - TABS=`echo "$HEADING" | sed s'/[^ ]//g'` - { - echo "\"$*\"$TABS" - echo "$HEADING" - for (( i=0; i<$SAMPLES; ++i)) ; do echo "`$*`" ; done - echo - } | tee $FILE -} - -HEADING="pub sub total Mb" -dosamples $SCRIPTDIR/perfdist --size $SIZE --count $COUNT --nsubs $NSUBS --npubs $NPUBS -s -- ${CLIENTS[*]} --- ${BROKERS[*]} -HEADING="pub" -dosamples ssh -A ${CLIENTS[0]} $TESTDIR/publish --routing-key perftest0 --size $SIZE --count $COUNT -s -b ${BROKERS[0]} -HEADING="sub" -dosamples ssh -A ${CLIENTS[0]} $TESTDIR/consume --queue perftest0 -s --count $COUNT -b ${BROKERS[0]} -HEADING="min max avg" -dosamples ssh -A ${CLIENTS[0]} $TESTDIR/echotest --count $ECHO -s -b ${BROKERS[0]} - -echo -echo "Tab separated spreadsheet (also saved as benchmark.tab):" -echo - -echo "benchmark -- ${CLIENTS[*]} --- ${BROKERS[*]} " | tee benchmark.tab -paste $FILES | tee -a benchmark.tab diff --git a/qpid/cpp/src/tests/cpg_check.sh.in b/qpid/cpp/src/tests/cpg_check.sh.in deleted file mode 100755 index ed97776218..0000000000 --- a/qpid/cpp/src/tests/cpg_check.sh.in +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -QPID_USE_CPG=${QPID_USE_CPG:-@USE_CPG@} - -# Check if CPG is enabled -cpg_enabled() { - test x$QPID_USE_CPG = xyes || return 1 # disabled - ps -u root | grep 'aisexec\|corosync' >/dev/null || { - echo WARNING: Skip cluster tests, aisexec or corosync daemon is not running. - return 1; # A warning, not a failure. - } - return 0 -} - -# Execute command with the ais group set if user is a member. -with_ais_group() { - if id -nG | grep '\<ais\>' >/dev/null; then sg ais -c "$*" - else "$@" - fi -} diff --git a/qpid/cpp/src/tests/federation_sys.py b/qpid/cpp/src/tests/federation_sys.py index 11590f684e..e2553e4cf3 100755 --- a/qpid/cpp/src/tests/federation_sys.py +++ b/qpid/cpp/src/tests/federation_sys.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -37,12 +37,12 @@ class Enum(object): class QmfTestBase010(TestBase010): - + _brokers = [] _links = [] _bridges = [] _alt_exch_ops = Enum(none=0, create=1, delete=2) - + class _Broker(object): """ This broker proxy object holds the Qmf proxy to a broker of known address as well as the QMF broker @@ -64,7 +64,7 @@ class QmfTestBase010(TestBase010): for session in self.sessions: try: # Session may have been closed by broker error session.close() - except Exception, e: print "WARNING: %s: Unable to close session %s (%s): %s %s" % (self, session, hex(id(session)), type(e), e) + except Exception, e: print "WARNING: %s: Unable to close session %s (%s): %s %s" % (self, session, hex(id(session)), type(e), e) try: # Connection may have been closed by broker error self.connection.close() except Exception, e: print "WARNING: %s: Unable to close connection %s (%s): %s %s" % (self, self.connection, hex(id(self.connection)), type(e), e) @@ -72,7 +72,7 @@ class QmfTestBase010(TestBase010): session = self.connection.session(name, transactional_flag) self.sessions.append(session) return session - + def setUp(self): """ Called one before each test starts @@ -96,34 +96,22 @@ class QmfTestBase010(TestBase010): b.destroy(self.qmf) TestBase010.tearDown(self) self.qmf.close() - + #--- General test utility functions - + def _get_name(self): """ Return the name of method which called this method stripped of "test_" prefix. Used for naming queues and exchanges on a per-test basis. """ return stack()[1][3][5:] - + def _get_broker_port(self, key): """ Get the port of a broker defined in the environment using -D<key>=portno """ return int(self.defines[key]) - - def _get_cluster_ports(self, key): - """ - Get the cluster ports from the parameters of the test which place it in the environment using - -D<key>="port0 port1 ... portN" (space-separated) - """ - ports = [] - ports_str = self.defines[key] - if ports_str: - for p in ports_str.split(): - ports.append(int(p)) - return ports - + def _get_send_address(self, exch_name, queue_name): """ Get an address to which to send messages based on the exchange name and queue name, but taking into account @@ -132,18 +120,15 @@ class QmfTestBase010(TestBase010): if len(exch_name) == 0: # Default exchange return queue_name return "%s/%s" % (exch_name, queue_name) - - def _get_broker(self, cluster_flag, broker_port_key, cluster_ports_key): + + def _get_broker(self, broker_port_key): """ Read the port numbers for pre-started brokers from the environment using keys, then find or create and return the Qmf broker proxy for the appropriate broker """ - if cluster_flag: - port = self._get_cluster_ports(cluster_ports_key)[0] # Always use the first node in the cluster - else: - port = self._get_broker_port(broker_port_key) + port = self._get_broker_port(broker_port_key) return self._find_create_broker("localhost:%s" % port) - + ################ def _get_msg_subject(self, topic_key): """ Return an appropriate subject for sending a message to a known topic. Return None if there is no topic. @@ -152,7 +137,7 @@ class QmfTestBase010(TestBase010): if "*" in topic_key: return topic_key.replace("*", "test") if "#" in topic_key: return topic_key.replace("#", "multipart.test") return topic_key - + def _send_msgs(self, session_name, broker, addr, msg_count, msg_content = "Message_%03d", topic_key = "", msg_durable_flag = False, enq_txn_size = 0): """ @@ -172,7 +157,7 @@ class QmfTestBase010(TestBase010): send_session.commit() sender.close() send_session.close() - + def _receive_msgs(self, session_name, broker, addr, msg_count, msg_content = "Message_%03d", deq_txn_size = 0, timeout = 0): """ @@ -214,9 +199,9 @@ class QmfTestBase010(TestBase010): receive_session.commit() receiver.close() receive_session.close() - + #--- QMF-specific utility functions - + def _get_qmf_property(self, props, key): """ Get the value of a named property key kj from a property list [(k0, v0), (k1, v1), ... (kn, vn)]. @@ -225,13 +210,13 @@ class QmfTestBase010(TestBase010): if k.name == key: return v return None - + def _check_qmf_return(self, method_result): """ Check the result of a Qmf-defined method call """ self.assertTrue(method_result.status == 0, method_result.text) - + def _check_optional_qmf_property(self, qmf_broker, type, qmf_object, key, expected_val, obj_ref_flag): """ Optional Qmf properties don't show up in the properties list when they are not specified. Checks for @@ -253,9 +238,9 @@ class QmfTestBase010(TestBase010): (type, qmf_object.name, key, val, expected_val)) else: self.fail("%s %s exists, but has an unexpected %s property \"%s\" set." % (type, qmf_object.name, key, val)) - + #--- Find/create Qmf broker objects - + def _find_qmf_broker(self, url): """ Find the Qmf broker object for the given broker URL. The broker must have been previously added to Qmf through @@ -265,7 +250,7 @@ class QmfTestBase010(TestBase010): if b.getBroker().getUrl() == url: return b return None - + def _find_create_broker(self, url): """ Find a running broker through Qmf. If it does not exist, add it (assuming the broker is already running). @@ -280,9 +265,9 @@ class QmfTestBase010(TestBase010): else: broker.qmf_broker = qmf_broker return broker - + #--- Find/create/delete exchanges - + def _find_qmf_exchange(self, qmf_broker, name, type, alternate, durable, auto_delete): """ Find Qmf exchange object @@ -302,7 +287,7 @@ class QmfTestBase010(TestBase010): (name, e.autoDelete, auto_delete)) return e return None - + def _find_create_qmf_exchange(self, qmf_broker, name, type, alternate, durable, auto_delete, args): """ Find Qmf exchange object if exchange exists, create exchange and return its Qmf object if not @@ -315,7 +300,7 @@ class QmfTestBase010(TestBase010): e = self._find_qmf_exchange(qmf_broker, name, type, alternate, durable, auto_delete) self.assertNotEqual(e, None, "Creation of exchange %s on broker %s failed" % (name, qmf_broker.getBroker().getUrl())) return e - + def _find_delete_qmf_exchange(self, qmf_broker, name, type, alternate, durable, auto_delete): """ Find and delete Qmf exchange object if it exists @@ -323,9 +308,9 @@ class QmfTestBase010(TestBase010): e = self._find_qmf_exchange(qmf_broker, name, type, alternate, durable, auto_delete) if e is not None and not auto_delete: self._check_qmf_return(qmf_broker.delete(type="exchange", name=name, options={})) - + #--- Find/create/delete queues - + def _find_qmf_queue(self, qmf_broker, name, alternate_exchange, durable, exclusive, auto_delete): """ Find a Qmf queue object @@ -344,7 +329,7 @@ class QmfTestBase010(TestBase010): (name, q.autoDelete, auto_delete)) return q return None - + def _find_create_qmf_queue(self, qmf_broker, name, alternate_exchange, durable, exclusive, auto_delete, args): """ Find Qmf queue object if queue exists, create queue and return its Qmf object if not @@ -357,7 +342,7 @@ class QmfTestBase010(TestBase010): q = self._find_qmf_queue(qmf_broker, name, alternate_exchange, durable, exclusive, auto_delete) self.assertNotEqual(q, None, "Creation of queue %s on broker %s failed" % (name, qmf_broker.getBroker().getUrl())) return q - + def _find_delete_qmf_queue(self, qmf_broker, name, alternate_exchange, durable, exclusive, auto_delete, args): """ Find and delete Qmf queue object if it exists @@ -365,9 +350,9 @@ class QmfTestBase010(TestBase010): q = self._find_qmf_queue(qmf_broker, name, alternate_exchange, durable, exclusive, auto_delete) if q is not None and not auto_delete: self._check_qmf_return(qmf_broker.delete(type="queue", name=name, options={})) - + #--- Find/create/delete bindings (between an exchange and a queue) - + def _find_qmf_binding(self, qmf_broker, qmf_exchange, qmf_queue, binding_key, binding_args): """ Find a Qmf binding object @@ -383,7 +368,7 @@ class QmfTestBase010(TestBase010): (qmf_exchange.name, qmf_queue.name, b.arguments, binding_args)) return b return None - + def _find_create_qmf_binding(self, qmf_broker, qmf_exchange, qmf_queue, binding_key, binding_args): """ Find Qmf binding object if it exists, create binding and return its Qmf object if not @@ -396,7 +381,7 @@ class QmfTestBase010(TestBase010): self.assertNotEqual(b, None, "Creation of binding between exchange %s and queue %s with key %s failed" % (qmf_exchange.name, qmf_queue.name, binding_key)) return b - + def _find_delete_qmf_binding(self, qmf_broker, qmf_exchange, qmf_queue, binding_key, binding_args): """ Find and delete Qmf binding object if it exists @@ -405,7 +390,7 @@ class QmfTestBase010(TestBase010): if b is not None: if len(qmf_exchange.name) > 0: # not default exchange self._check_qmf_return(qmf_broker.delete(type="binding", name="%s/%s/%s" % (qmf_exchange.name, qmf_queue.name, binding_key), options={})) - + #--- Find/create a link def _find_qmf_link(self, qmf_from_broker_proxy, host, port): @@ -416,7 +401,7 @@ class QmfTestBase010(TestBase010): if l.host == host and l.port == port: return l return None - + def _find_create_qmf_link(self, qmf_from_broker, qmf_to_broker_proxy, link_durable_flag, auth_mechanism, user_id, password, transport, pause_interval, link_ready_timeout): """ @@ -433,24 +418,19 @@ class QmfTestBase010(TestBase010): (qmf_from_broker.getBroker().getUrl(), qmf_to_broker_proxy.getUrl())) self._wait_for_link(l, pause_interval, link_ready_timeout) return l - + def _wait_for_link(self, link, pause_interval, link_ready_timeout): """ Wait for link to become active (state=Operational) """ tot_time = 0 link.update() - if link.state == "": - # Link mgmt updates for the c++ link object are disabled when in a cluster because of inconsistent state: - # one is "Operational", the other "Passive". In this case, wait a bit and hope for the best... - sleep(2*pause_interval) - else: - while link.state != "Operational" and tot_time < link_ready_timeout: - sleep(pause_interval) - tot_time += pause_interval - link.update() - self.assertEqual(link.state, "Operational", "Timeout: Link not operational, state=%s" % link.state) - + while link.state != "Operational" and tot_time < link_ready_timeout: + sleep(pause_interval) + tot_time += pause_interval + link.update() + self.assertEqual(link.state, "Operational", "Timeout: Link not operational, state=%s" % link.state) + #--- Find/create a bridge def _find_qmf_bridge(self, qmf_broker_proxy, qmf_link, source, destination, key): @@ -461,7 +441,7 @@ class QmfTestBase010(TestBase010): if b.linkRef == qmf_link.getObjectId() and b.src == source and b.dest == destination and b.key == key: return b return None - + def _find_create_qmf_bridge(self, qmf_broker_proxy, qmf_link, queue_name, exch_name, topic_key, queue_route_type_flag, bridge_durable_flag): """ @@ -486,7 +466,7 @@ class QmfTestBase010(TestBase010): b = self._find_qmf_bridge(qmf_broker_proxy, qmf_link, src, dest, key) self.assertNotEqual(b, None, "Bridge creation failed: src=%s dest=%s key=%s" % (src, dest, key)) return b - + def _wait_for_bridge(self, bridge, src_broker, dest_broker, exch_name, queue_name, topic_key, pause_interval, bridge_ready_timeout): """ @@ -522,9 +502,9 @@ class QmfTestBase010(TestBase010): sender.close() send_session.close() self.assertTrue(active, "Bridge failed to become active after %ds: %s" % (bridge_ready_timeout, bridge)) - + #--- Find/create/delete utility functions - + def _create_and_bind(self, qmf_broker, exchange_args, queue_args, binding_args): """ Create a binding between a named exchange and queue on a broker @@ -532,7 +512,7 @@ class QmfTestBase010(TestBase010): e = self._find_create_qmf_exchange(qmf_broker, **exchange_args) q = self._find_create_qmf_queue(qmf_broker, **queue_args) return self._find_create_qmf_binding(qmf_broker, e, q, **binding_args) - + def _check_alt_exchange(self, qmf_broker, alt_exch_name, alt_exch_type, alt_exch_op): """ Check for existence of alternate exchange. Return the Qmf exchange proxy object for the alternate exchange @@ -546,7 +526,7 @@ class QmfTestBase010(TestBase010): alternate="", durable=False, auto_delete=False) return self._find_qmf_exchange(qmf_broker=qmf_broker, name=alt_exchange_name, type=alt_exchange_type, alternate="", durable=False, auto_delete=False) - + def _delete_queue_binding(self, qmf_broker, exchange_args, queue_args, binding_args): """ Delete a queue and the binding between it and the exchange @@ -555,7 +535,7 @@ class QmfTestBase010(TestBase010): q = self._find_qmf_queue(qmf_broker, queue_args["name"], queue_args["alternate_exchange"], queue_args["durable"], queue_args["exclusive"], queue_args["auto_delete"]) self._find_delete_qmf_binding(qmf_broker, e, q, **binding_args) self._find_delete_qmf_queue(qmf_broker, **queue_args) - + def _create_route(self, queue_route_type_flag, src_broker, dest_broker, exch_name, queue_name, topic_key, link_durable_flag, bridge_durable_flag, auth_mechanism, user_id, password, transport, pause_interval = 1, link_ready_timeout = 20, bridge_ready_timeout = 20): @@ -571,7 +551,7 @@ class QmfTestBase010(TestBase010): self._wait_for_bridge(b, src_broker, dest_broker, exch_name, queue_name, topic_key, pause_interval, bridge_ready_timeout) # Parameterized test - entry point for tests - + def _do_test(self, test_name, # Name of test exch_name = "amq.direct", # Remote exchange name @@ -597,8 +577,6 @@ class QmfTestBase010(TestBase010): queue_route_type_flag = False, # Route type: false = bridge route, true = queue route enq_txn_size = 0, # Enqueue transaction size, 0 = no transactions deq_txn_size = 0, # Dequeue transaction size, 0 = no transactions - local_cluster_flag = False, # Use a node from the local cluster, otherwise use single local broker - remote_cluster_flag = False, # Use a node from the remote cluster, otherwise use single remote broker alt_exch_op = _alt_exch_ops.create,# Op on alt exch [create (ensure present), delete (ensure not present), none (neither create nor delete)] auth_mechanism = "", # Authorization mechanism for linked broker user_id = "", # User ID for authorization on linked broker @@ -609,32 +587,32 @@ class QmfTestBase010(TestBase010): Parameterized federation test. Sets up a federated link between a source broker and a destination broker and checks that messages correctly pass over the link to the destination. Where appropriate (non-queue-routes), also checks for the presence of messages on the source broker. - + In these tests, the concept is to create a LOCAL broker, then create a link to a REMOTE broker using federation. In other words, the messages sent to the LOCAL broker will be replicated on the REMOTE broker, and tests are performed on the REMOTE broker to check that the required messages are present. In the case of regular routes, the LOCAL broker will also retain the messages, and a similar test is performed on this broker. - + TODO: There are several items to improve here: 1. _do_test() is rather general. Rather create a version for each exchange type and test the exchange/queue interaction in more detail based on the exchange type 2. Add a headers and an xml exchange type - 3. Restructure the tests to start and stop brokers and clusters directly rather than relying on previously - started brokers. Then persistence can be checked by stopping and restarting the brokers/clusters. In particular, + 3. Restructure the tests to start and stop brokers directly rather than relying on previously + started brokers. Then persistence can be checked by stopping and restarting the brokers. In particular, test the persistence of links and bridges, both of which take a persistence flag. 4. Test the behavior of the alternate exchanges when messages are sourced through a link. Also check behavior when the alternate exchange is not present or is deleted after the reference is made. 5. Test special queue types (eg LVQ) """ - local_broker = self._get_broker(local_cluster_flag, "local-port", "local-cluster-ports") - remote_broker = self._get_broker(remote_cluster_flag, "remote-port", "remote-cluster-ports") - + local_broker = self._get_broker("local-port") + remote_broker = self._get_broker("remote-port") + # Check alternate exchanges exist (and create them if not) on both local and remote brokers self._check_alt_exchange(local_broker.qmf_broker, exch_alt_exch, exch_alt_exch_type, alt_exch_op) self._check_alt_exchange(local_broker.qmf_broker, queue_alt_exch, queue_alt_exch_type, alt_exch_op) self._check_alt_exchange(remote_broker.qmf_broker, exch_alt_exch, exch_alt_exch_type, alt_exch_op) self._check_alt_exchange(remote_broker.qmf_broker, queue_alt_exch, queue_alt_exch_type, alt_exch_op) - + queue_name = "queue_%s" % test_name exchange_args = {"name": exch_name, "type": exch_type, "alternate": exch_alt_exch, "durable": exch_durable_flag, "auto_delete": exch_auto_delete_flag, "args": exch_x_args} @@ -658,70 +636,70 @@ class QmfTestBase010(TestBase010): if not queue_route_type_flag: self._receive_msgs("local_receive_session", local_broker, addr = queue_name, msg_count = msg_count, deq_txn_size = deq_txn_size) self._receive_msgs("remote_receive_session", remote_broker, addr = queue_name, msg_count = msg_count, deq_txn_size = deq_txn_size, timeout = 5) - + # Clean up self._delete_queue_binding(qmf_broker=local_broker.qmf_broker, exchange_args=exchange_args, queue_args=queue_args, binding_args=binding_args) self._delete_queue_binding(qmf_broker=remote_broker.qmf_broker, exchange_args=exchange_args, queue_args=queue_args, binding_args=binding_args) class A_ShortTests(QmfTestBase010): - + def test_route_defaultExch(self): self._do_test(self._get_name()) - + def test_queueRoute_defaultExch(self): self._do_test(self._get_name(), queue_route_type_flag=True) - - + + class A_LongTests(QmfTestBase010): - + def test_route_amqDirectExch(self): self._do_test(self._get_name(), exch_name="amq.direct") - + def test_queueRoute_amqDirectExch(self): self._do_test(self._get_name(), exch_name="amq.direct", queue_route_type_flag=True) - - + + def test_route_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange") - + def test_queueRoute_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True) - - + + def test_route_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout") - + def test_queueRoute_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True) - - + + def test_route_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#") - + def test_queueRoute_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True) - - + + class B_ShortTransactionTests(QmfTestBase010): - + def test_txEnq01_route_defaultExch(self): self._do_test(self._get_name(), enq_txn_size=1) - + def test_txEnq01_queueRoute_defaultExch(self): self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=1) - + def test_txEnq01_txDeq01_route_defaultExch(self): self._do_test(self._get_name(), enq_txn_size=1, deq_txn_size=1) - + def test_txEnq01_txDeq01_queueRoute_defaultExch(self): self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1) - + class B_LongTransactionTests(QmfTestBase010): - + def test_txEnq10_route_defaultExch(self): self._do_test(self._get_name(), enq_txn_size=10, msg_count = 103) - + def test_txEnq10_queueRoute_defaultExch(self): self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=10, msg_count = 103) @@ -730,1171 +708,270 @@ class B_LongTransactionTests(QmfTestBase010): def test_txEnq01_route_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=1) - + def test_txEnq01_queueRoute_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=1) def test_txEnq10_route_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=10, msg_count = 103) - + def test_txEnq10_queueRoute_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103) - + def test_txEnq01_txDeq01_route_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=1, deq_txn_size=1) - + def test_txEnq01_txDeq01_queueRoute_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1) def test_txEnq01_route_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=1) - + def test_txEnq01_queueRoute_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=1) def test_txEnq10_route_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=10, msg_count = 103) - + def test_txEnq10_queueRoute_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103) - + def test_txEnq01_txDeq01_route_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=1, deq_txn_size=1) - + def test_txEnq01_txDeq01_queueRoute_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1) def test_txEnq01_route_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=1) - + def test_txEnq01_queueRoute_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=1) def test_txEnq10_route_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=10, msg_count = 103) - + def test_txEnq10_queueRoute_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103) - + def test_txEnq01_txDeq01_route_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=1, deq_txn_size=1) - + def test_txEnq01_txDeq01_queueRoute_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1) -class C_ShortClusterTests(QmfTestBase010): - - def test_locCluster_route_defaultExch(self): - self._do_test(self._get_name(), local_cluster_flag=True) - - def test_locCluster_queueRoute_defaultExch(self): - self._do_test(self._get_name(), queue_route_type_flag=True, local_cluster_flag=True) - - def test_remCluster_route_defaultExch(self): - self._do_test(self._get_name(), remote_cluster_flag=True) - - def test_remCluster_queueRoute_defaultExch(self): - self._do_test(self._get_name(), queue_route_type_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_route_defaultExch(self): - self._do_test(self._get_name(), local_cluster_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_queueRoute_defaultExch(self): - self._do_test(self._get_name(), queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True) - - -class C_LongClusterTests(QmfTestBase010): - - def test_locCluster_route_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", local_cluster_flag=True) - - def test_locCluster_queueRoute_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, local_cluster_flag=True) - - def test_remCluster_route_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", remote_cluster_flag=True) - - def test_remCluster_queueRoute_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_route_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", local_cluster_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_queueRoute_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True) - - - def test_locCluster_route_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", local_cluster_flag=True) - - def test_locCluster_queueRoute_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, local_cluster_flag=True) - - def test_remCluster_route_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", remote_cluster_flag=True) - - def test_remCluster_queueRoute_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_route_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", local_cluster_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_queueRoute_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True) - - - def test_locCluster_route_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", local_cluster_flag=True) - - def test_locCluster_queueRoute_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, local_cluster_flag=True) - - def test_remCluster_route_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", remote_cluster_flag=True) - - def test_remCluster_queueRoute_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_route_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", local_cluster_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_queueRoute_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True) - - -class D_ShortClusterTransactionTests(QmfTestBase010): - - def test_txEnq01_locCluster_route_defaultExch(self): - self._do_test(self._get_name(), enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_locCluster_queueRoute_defaultExch(self): - self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_route_defaultExch(self): - self._do_test(self._get_name(), enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_queueRoute_defaultExch(self): - self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_remCluster_route_defaultExch(self): - self._do_test(self._get_name(), enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_remCluster_queueRoute_defaultExch(self): - self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_route_defaultExch(self): - self._do_test(self._get_name(), enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_queueRoute_defaultExch(self): - self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_route_defaultExch(self): - self._do_test(self._get_name(), enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_queueRoute_defaultExch(self): - self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_route_defaultExch(self): - self._do_test(self._get_name(), enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_defaultExch(self): - self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - -class D_LongClusterTransactionTests(QmfTestBase010): - - def test_txEnq10_locCluster_route_defaultExch(self): - self._do_test(self._get_name(), enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq10_locCluster_queueRoute_defaultExch(self): - self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq10_remCluster_route_defaultExch(self): - self._do_test(self._get_name(), enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq10_remCluster_queueRoute_defaultExch(self): - self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_route_defaultExch(self): - self._do_test(self._get_name(), enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_queueRoute_defaultExch(self): - self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - - def test_txEnq01_locCluster_route_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_locCluster_queueRoute_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq10_locCluster_route_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq10_locCluster_queueRoute_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_route_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_queueRoute_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_remCluster_route_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_remCluster_queueRoute_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq10_remCluster_route_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq10_remCluster_queueRoute_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_route_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_queueRoute_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_route_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_queueRoute_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_route_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_queueRoute_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_route_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - - def test_txEnq01_locCluster_route_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_locCluster_queueRoute_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq10_locCluster_route_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq10_locCluster_queueRoute_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_route_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_queueRoute_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_remCluster_route_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_remCluster_queueRoute_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq10_remCluster_route_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq10_remCluster_queueRoute_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_route_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_queueRoute_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_route_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_queueRoute_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_route_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_queueRoute_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_route_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - - def test_txEnq01_locCluster_route_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_locCluster_queueRoute_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq10_locCluster_route_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq10_locCluster_queueRoute_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_route_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_queueRoute_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_remCluster_route_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_remCluster_queueRoute_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq10_remCluster_route_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq10_remCluster_queueRoute_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_route_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_queueRoute_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_route_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_queueRoute_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_route_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_queueRoute_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_route_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - -class E_ShortPersistenceTests(QmfTestBase010): - +class E_ShortPersistenceTests(QmfTestBase010): + def test_route_durQueue_defaultExch(self): self._do_test(self._get_name(), queue_durable_flag=True) - + def test_route_durMsg_durQueue_defaultExch(self): self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True) - + def test_queueRoute_durQueue_defaultExch(self): self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True) - + def test_queueRoute_durMsg_durQueue_defaultExch(self): self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True) -class E_LongPersistenceTests(QmfTestBase010): +class E_LongPersistenceTests(QmfTestBase010): + - def test_route_durQueue_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True) - + def test_route_durMsg_durQueue_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True) - + def test_queueRoute_durQueue_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True) - + def test_queueRoute_durMsg_durQueue_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True) - + def test_route_durQueue_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True) - + def test_route_durMsg_durQueue_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True) - + def test_queueRoute_durQueue_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True) - + def test_queueRoute_durMsg_durQueue_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True) - + def test_route_durQueue_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True) - + def test_route_durMsg_durQueue_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True) - + def test_queueRoute_durQueue_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True) - + def test_queueRoute_durMsg_durQueue_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True) - + class F_ShortPersistenceTransactionTests(QmfTestBase010): - + def test_txEnq01_route_durQueue_defaultExch(self): self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=1) - + def test_txEnq01_route_durMsg_durQueue_defaultExch(self): self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1) - + def test_txEnq01_queueRoute_durQueue_defaultExch(self): self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1) - + def test_txEnq01_queueRoute_durMsg_durQueue_defaultExch(self): self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1) - + def test_txEnq01_txDeq01_route_durQueue_defaultExch(self): self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1) - + def test_txEnq01_txDeq01_route_durMsg_durQueue_defaultExch(self): self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1) - + def test_txEnq01_txDeq01_queueRoute_durQueue_defaultExch(self): self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1) - + def test_txEnq01_txDeq01_queueRoute_durMsg_durQueue_defaultExch(self): self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1) - + class F_LongPersistenceTransactionTests(QmfTestBase010): - + def test_txEnq10_route_durQueue_defaultExch(self): self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=10, msg_count = 103) - + def test_txEnq10_route_durMsg_durQueue_defaultExch(self): self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103) - + def test_txEnq10_queueRoute_durQueue_defaultExch(self): self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103) - + def test_txEnq10_queueRoute_durMsg_durQueue_defaultExch(self): self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103) - - + + def test_txEnq01_route_durQueue_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=1) - + def test_txEnq01_route_durMsg_durQueue_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1) - + def test_txEnq01_queueRoute_durQueue_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1) - + def test_txEnq01_queueRoute_durMsg_durQueue_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1) - + def test_txEnq10_route_durQueue_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=10, msg_count = 103) - + def test_txEnq10_route_durMsg_durQueue_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103) - + def test_txEnq10_queueRoute_durQueue_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103) - + def test_txEnq10_queueRoute_durMsg_durQueue_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103) - + def test_txEnq01_txDeq01_route_durQueue_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1) - + def test_txEnq01_txDeq01_route_durMsg_durQueue_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1) - + def test_txEnq01_txDeq01_queueRoute_durQueue_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1) - + def test_txEnq01_txDeq01_queueRoute_durMsg_durQueue_directExch(self): self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1) - + def test_txEnq01_route_durQueue_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=1) - + def test_txEnq01_route_durMsg_durQueue_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1) - + def test_txEnq01_queueRoute_durQueue_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1) - + def test_txEnq01_queueRoute_durMsg_durQueue_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1) - + def test_txEnq10_route_durQueue_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=10, msg_count = 103) - + def test_txEnq10_route_durMsg_durQueue_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103) - + def test_txEnq10_queueRoute_durQueue_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103) - + def test_txEnq10_queueRoute_durMsg_durQueue_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103) - + def test_txEnq01_txDeq01_route_durQueue_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1) - + def test_txEnq01_txDeq01_route_durMsg_durQueue_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1) - + def test_txEnq01_txDeq01_queueRoute_durQueue_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1) - + def test_txEnq01_txDeq01_queueRoute_durMsg_durQueue_fanoutExch(self): self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1) def test_txEnq01_route_durQueue_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=1) - + def test_txEnq01_route_durMsg_durQueue_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1) - + def test_txEnq01_queueRoute_durQueue_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1) - + def test_txEnq01_queueRoute_durMsg_durQueue_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1) def test_txEnq10_route_durQueue_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=10, msg_count = 103) - + def test_txEnq10_route_durMsg_durQueue_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103) - + def test_txEnq10_queueRoute_durQueue_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103) - + def test_txEnq10_queueRoute_durMsg_durQueue_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103) - + def test_txEnq01_txDeq01_route_durQueue_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1) - + def test_txEnq01_txDeq01_route_durMsg_durQueue_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1) - + def test_txEnq01_txDeq01_queueRoute_durQueue_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1) - + def test_txEnq01_txDeq01_queueRoute_durMsg_durQueue_topicExch(self): self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1) -class G_ShortPersistenceClusterTests(QmfTestBase010): - - def test_locCluster_route_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, local_cluster_flag=True) - - def test_locCluster_route_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, local_cluster_flag=True) - - def test_locCluster_queueRoute_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True) - - def test_locCluster_queueRoute_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True) - - def test_remCluster_route_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, remote_cluster_flag=True) - - def test_remCluster_route_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, remote_cluster_flag=True) - - def test_remCluster_queueRoute_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, remote_cluster_flag=True) - - def test_remCluster_queueRoute_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_route_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, local_cluster_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_route_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, local_cluster_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_queueRoute_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_queueRoute_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True) - - -class G_LongPersistenceClusterTests(QmfTestBase010): - - - - def test_locCluster_route_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, local_cluster_flag=True) - - def test_locCluster_route_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, local_cluster_flag=True) - - def test_locCluster_queueRoute_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True) - - def test_locCluster_queueRoute_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True) - - def test_remCluster_route_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, remote_cluster_flag=True) - - def test_remCluster_route_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, remote_cluster_flag=True) - - def test_remCluster_queueRoute_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, remote_cluster_flag=True) - - def test_remCluster_queueRoute_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_route_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, local_cluster_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_route_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, local_cluster_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_queueRoute_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_queueRoute_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True) - - - def test_locCluster_route_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, local_cluster_flag=True) - - def test_locCluster_route_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, local_cluster_flag=True) - - def test_locCluster_queueRoute_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True) - - def test_locCluster_queueRoute_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True) - - def test_remCluster_route_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, remote_cluster_flag=True) - - def test_remCluster_route_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, remote_cluster_flag=True) - - def test_remCluster_queueRoute_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, remote_cluster_flag=True) - - def test_remCluster_queueRoute_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_route_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, local_cluster_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_route_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, local_cluster_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_queueRoute_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_queueRoute_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True) - - - def test_locCluster_route_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, local_cluster_flag=True) - - def test_locCluster_route_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, local_cluster_flag=True) - - def test_locCluster_queueRoute_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True) - - def test_locCluster_queueRoute_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True) - - def test_remCluster_route_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, remote_cluster_flag=True) - - def test_remCluster_route_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, remote_cluster_flag=True) - - def test_remCluster_queueRoute_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, remote_cluster_flag=True) - - def test_remCluster_queueRoute_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_route_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, local_cluster_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_route_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, local_cluster_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_queueRoute_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True) - - def test_locCluster_remCluster_queueRoute_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True) - - -class H_ShortPersistenceClusterTransactionTests(QmfTestBase010): - - def test_txEnq01_locCluster_route_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_locCluster_route_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_locCluster_queueRoute_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_locCluster_queueRoute_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_route_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_route_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_queueRoute_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_queueRoute_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_remCluster_route_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_remCluster_route_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_remCluster_queueRoute_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_remCluster_queueRoute_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_route_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_route_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_queueRoute_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_queueRoute_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_route_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_route_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_queueRoute_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_queueRoute_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_route_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_route_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - -class H_LongPersistenceClusterTransactionTests(QmfTestBase010): - - def test_txEnq10_locCluster_route_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq10_locCluster_route_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq10_locCluster_queueRoute_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq10_locCluster_queueRoute_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq10_remCluster_route_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq10_remCluster_route_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq10_remCluster_queueRoute_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq10_remCluster_queueRoute_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_route_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_route_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_queueRoute_durQueue_defaultExch(self): - self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_queueRoute_durMsg_durQueue_defaultExch(self): - self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - - - - def test_txEnq01_locCluster_route_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_locCluster_route_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_locCluster_queueRoute_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_locCluster_queueRoute_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq10_locCluster_route_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq10_locCluster_route_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq10_locCluster_queueRoute_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq10_locCluster_queueRoute_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_route_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_route_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_queueRoute_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_queueRoute_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_remCluster_route_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_remCluster_route_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_remCluster_queueRoute_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_remCluster_queueRoute_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq10_remCluster_route_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq10_remCluster_route_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq10_remCluster_queueRoute_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq10_remCluster_queueRoute_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_route_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_route_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_queueRoute_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_queueRoute_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_route_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_route_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_queueRoute_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_queueRoute_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_route_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_route_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_queueRoute_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_queueRoute_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_route_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_route_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_durMsg_durQueue_directExch(self): - self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - - def test_txEnq01_locCluster_route_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_locCluster_route_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_locCluster_queueRoute_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_locCluster_queueRoute_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq10_locCluster_route_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq10_locCluster_route_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq10_locCluster_queueRoute_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq10_locCluster_queueRoute_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_route_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_route_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_queueRoute_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_queueRoute_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_remCluster_route_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_remCluster_route_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_remCluster_queueRoute_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_remCluster_queueRoute_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq10_remCluster_route_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq10_remCluster_route_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq10_remCluster_queueRoute_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq10_remCluster_queueRoute_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_route_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_route_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_queueRoute_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_queueRoute_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_route_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_route_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_queueRoute_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_queueRoute_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_route_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_route_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_queueRoute_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_queueRoute_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_route_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_route_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_durMsg_durQueue_fanoutExch(self): - self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - - def test_txEnq01_locCluster_route_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_locCluster_route_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_locCluster_queueRoute_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_locCluster_queueRoute_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True) - - def test_txEnq10_locCluster_route_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq10_locCluster_route_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq10_locCluster_queueRoute_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq10_locCluster_queueRoute_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_route_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_route_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_queueRoute_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_queueRoute_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True) - - def test_txEnq01_remCluster_route_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_remCluster_route_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_remCluster_queueRoute_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_remCluster_queueRoute_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq10_remCluster_route_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq10_remCluster_route_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq10_remCluster_queueRoute_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq10_remCluster_queueRoute_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_route_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_route_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_queueRoute_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_remCluster_queueRoute_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_route_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_route_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_queueRoute_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_locCluster_remCluster_queueRoute_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_route_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_route_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_queueRoute_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq10_locCluster_remCluster_queueRoute_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_route_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_route_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - - def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_durMsg_durQueue_topicExch(self): - self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True) - diff --git a/qpid/cpp/src/tests/ipv6_test b/qpid/cpp/src/tests/ipv6_test index 9d1cb2acdd..f47e721513 100755 --- a/qpid/cpp/src/tests/ipv6_test +++ b/qpid/cpp/src/tests/ipv6_test @@ -122,43 +122,3 @@ else rm rdata-in rdata-out fi -# Cluster smoke test follows -test -z $CLUSTER_LIB && exit 0 # Exit if cluster not supported. - -## Test failover in a cluster using IPv6 only -. cpg_check.sh -cpg_enabled || exit 0 - -pick_port() { - # We need a fixed port to set --cluster-url. Use qpidd to pick a free port. - # Note this method is racy - PICK=$($QPIDD_EXEC -dp0) - $QPIDD_EXEC -qp $PICK - echo $PICK -} - -ssl_cluster_broker() { # $1 = port - $QPIDD_EXEC $COMMON_OPTS --load-module $CLUSTER_LIB --cluster-name ipv6_test.$HOSTNAME.$$ --cluster-url amqp:[$TEST_HOSTNAME]:$1 --port $1 - # Wait for broker to be ready - ./qpid-ping -b $TEST_HOSTNAME -qp $1 || { echo "Cannot connect to broker on $1"; exit 1; } - echo "Running IPv6 cluster broker on port $1" -} - -PORT1=`pick_port`; ssl_cluster_broker $PORT1 -PORT2=`pick_port`; ssl_cluster_broker $PORT2 - -# Pipe receive output to uniq to remove duplicates -./qpid-receive --connection-options "{reconnect:true, reconnect-timeout:5}" --failover-updates -b amqp:[$TEST_HOSTNAME]:$PORT1 -a "foo;{create:always}" -f | uniq > ssl_test_receive.tmp & - -./qpid-send -b amqp:[$TEST_HOSTNAME]:$PORT2 --content-string=one -a "foo;{create:always}" - -$QPIDD_EXEC -qp $PORT1 # Kill broker 1 receiver should fail-over. -./qpid-send -b amqp:[$TEST_HOSTNAME]:$PORT2 --content-string=two -a "foo;{create:always}" --send-eos 1 -wait # Wait for qpid-receive -{ echo one; echo two; } > ssl_test_receive.cmp -diff ssl_test_receive.tmp ssl_test_receive.cmp || { echo "Failover failed"; exit 1; } - -$QPIDD_EXEC -qp $PORT2 - -rm -f ssl_test_receive.* - diff --git a/qpid/cpp/src/tests/run_failover_soak b/qpid/cpp/src/tests/run_failover_soak deleted file mode 100755 index 2c56bf7d6b..0000000000 --- a/qpid/cpp/src/tests/run_failover_soak +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -source ./test_env.sh -source cpg_check.sh -cpg_enabled || exit 0 - -host=127.0.0.1 - -unset QPID_NO_MODULE_DIR # failover_soak uses --module-dir, dont want clash -MODULES=${MODULES:-$moduledir} -MESSAGES=${MESSAGES:-500000} -REPORT_FREQUENCY=${REPORT_FREQUENCY:-20000} -VERBOSITY=${VERBOSITY:-0} -DURABILITY=${DURABILITY:-0} -N_QUEUES=${N_QUEUES:-1} -N_BROKERS=${N_BROKERS:-4} - -rm -f soak-*.log -exec ./failover_soak $MODULES ./declare_queues ./replaying_sender ./resuming_receiver $MESSAGES $REPORT_FREQUENCY $VERBOSITY $DURABILITY $N_QUEUES $N_BROKERS - diff --git a/qpid/cpp/src/tests/run_federation_sys_tests b/qpid/cpp/src/tests/run_federation_sys_tests index 76da176914..d9a9649c37 100755 --- a/qpid/cpp/src/tests/run_federation_sys_tests +++ b/qpid/cpp/src/tests/run_federation_sys_tests @@ -25,10 +25,6 @@ source ./test_env.sh MODULENAME=federation_sys -# Test for clustering -source cpg_check.sh -if cpg_enabled; then CLUSTERING_ENABLED=1; fi - # Test for long test if [[ "$1" == "LONG_TEST" ]]; then USE_LONG_TEST=1 @@ -42,11 +38,7 @@ if [ -z ${USE_LONG_TEST} ]; then SKIPTESTS="-i federation_sys.A_Long* -i federation_sys.B_Long* ${SKIPTESTS}" fi echo "WARNING: Tests using persistence will be ignored." -if [ -z ${CLUSTERING_ENABLED} ]; then - SKIPTESTS="${SKIPTESTS} -i federation_sys.C_* -i federation_sys.D_*" -elif [ -z ${USE_LONG_TEST} ]; then - SKIPTESTS="${SKIPTESTS} -i federation_sys.C_Long* -i federation_sys.D_Long*" -fi +SKIPTESTS="${SKIPTESTS} -i federation_sys.C_* -i federation_sys.D_*" start_brokers() { start_broker() { @@ -56,35 +48,21 @@ start_brokers() { } start_broker "" LOCAL_PORT start_broker "" REMOTE_PORT - if [ -n "${CLUSTERING_ENABLED}" ]; then - start_broker "--load-module ${CLUSTER_LIB} --cluster-name test-cluster-1" CLUSTER_C1_1 - start_broker "--load-module ${CLUSTER_LIB} --cluster-name test-cluster-1" CLUSTER_C1_2 - start_broker "--load-module ${CLUSTER_LIB} --cluster-name test-cluster-2" CLUSTER_C2_1 - start_broker "--load-module ${CLUSTER_LIB} --cluster-name test-cluster-2" CLUSTER_C2_2 - fi rm qpidd.port } stop_brokers() { ${QPIDD_EXEC} -q --port ${LOCAL_PORT} ${QPIDD_EXEC} -q --port ${REMOTE_PORT} - if [ -n "${CLUSTERING_ENABLED}" ]; then - ${QPID_CLUSTER_EXEC} --all-stop --force localhost:${CLUSTER_C1_1} - ${QPID_CLUSTER_EXEC} --all-stop --force localhost:${CLUSTER_C2_1} - fi } if test -d ${PYTHON_DIR} ; then start_brokers - if [ -z ${CLUSTERING_ENABLED} ]; then - echo "Running federation tests using brokers on local port ${LOCAL_PORT}, remote port ${REMOTE_PORT} (NOTE: clustering is DISABLED)" - else - echo "Running federation tests using brokers on local port ${LOCAL_PORT}, remote port ${REMOTE_PORT}, local cluster nodes ${CLUSTER_C1_1} ${CLUSTER_C1_2}, remote cluster nodes ${CLUSTER_C2_1} ${CLUSTER_C2_2}" - fi + echo "Running federation tests using brokers on local port ${LOCAL_PORT}, remote port ${REMOTE_PORT} (NOTE: clustering is DISABLED)" if [ -z ${USE_LONG_TEST} ]; then echo "NOTE: To run a full set of federation system tests, use \"make check-long\". To test with persistence, run the store version of this script." fi - ${QPID_PYTHON_TEST} -m ${MODULENAME} ${SKIPTESTS} -b localhost:${REMOTE_PORT} -Dlocal-port=${LOCAL_PORT} -Dremote-port=${REMOTE_PORT} -Dlocal-cluster-ports="${CLUSTER_C1_1} ${CLUSTER_C1_2}" -Dremote-cluster-ports="${CLUSTER_C2_1} ${CLUSTER_C2_2}" $@ + ${QPID_PYTHON_TEST} -m ${MODULENAME} ${SKIPTESTS} -b localhost:${REMOTE_PORT} -Dlocal-port=${LOCAL_PORT} -Dremote-port=${REMOTE_PORT} $@ RETCODE=$? stop_brokers if test x${RETCODE} != x0; then diff --git a/qpid/cpp/src/tests/ssl_test b/qpid/cpp/src/tests/ssl_test index 19a316a483..89aaf44af0 100755 --- a/qpid/cpp/src/tests/ssl_test +++ b/qpid/cpp/src/tests/ssl_test @@ -193,29 +193,3 @@ echo "Running SSL/TCP mux test on random port $PORT" ./qpid-perftest --count ${COUNT} --port ${PORT} -P tcp -b $TEST_HOSTNAME --summary || error "TCP connection failed!" stop_brokers - -test -z $CLUSTER_LIB && exit 0 # Exit if cluster not supported. - -## Test failover in a cluster using SSL only -source cpg_check.sh -cpg_enabled || exit 0 - -PORT1=`pick_port`; ssl_cluster_broker $PORT1 -echo "Running SSL cluster broker on port $PORT1" - -PORT2=`pick_port`; ssl_cluster_broker $PORT2 -echo "Running SSL cluster broker on port $PORT2" - -# Pipe receive output to uniq to remove duplicates -./qpid-receive --connection-options "{reconnect:true, reconnect-timeout:5}" --failover-updates -b amqp:ssl:$TEST_HOSTNAME:$PORT1 -a "foo;{create:always}" -f | uniq > ssl_test_receive.tmp & -./qpid-send -b amqp:ssl:$TEST_HOSTNAME:$PORT2 --content-string=one -a "foo;{create:always}" - -stop_broker 0 # Kill broker 1 - receiver should fail-over. -echo "Killed SSL cluster broker on port $PORT1" - -./qpid-send -b amqp:ssl:$TEST_HOSTNAME:$PORT2 --content-string=two -a "foo;{create:always}" --send-eos 1 -wait # Wait for qpid-receive -{ echo one; echo two; } > ssl_test_receive.cmp -diff ssl_test_receive.tmp ssl_test_receive.cmp || { echo "Failover failed"; exit 1; } -rm -f ssl_test_receive.* - diff --git a/qpid/cpp/src/tests/test_env.sh.in b/qpid/cpp/src/tests/test_env.sh.in index 02c34af649..76e88283ed 100644 --- a/qpid/cpp/src/tests/test_env.sh.in +++ b/qpid/cpp/src/tests/test_env.sh.in @@ -43,7 +43,6 @@ export PYTHON_COMMANDS=$QPID_TOOLS/src/py export PYTHONPATH=$srcdir:$PYTHON_DIR:$PYTHON_COMMANDS:$QPID_TESTS_PY:$QMF_LIB:$PYTHONPATH export QPID_CONFIG_EXEC=$PYTHON_COMMANDS/qpid-config export QPID_ROUTE_EXEC=$PYTHON_COMMANDS/qpid-route -export QPID_CLUSTER_EXEC=$PYTHON_COMMANDS/qpid-cluster export QPID_HA_EXEC=$PYTHON_COMMANDS/qpid-ha # Executables @@ -63,7 +62,6 @@ export TEST_STORE_LIB=$testmoduledir/test_store.so exportmodule() { test -f $moduledir/$2 && eval "export $1=$moduledir/$2"; } exportmodule ACL_LIB acl.so -exportmodule CLUSTER_LIB cluster.so exportmodule HA_LIB ha.so exportmodule SSLCONNECTOR_LIB sslconnector.so exportmodule SSL_LIB ssl.so |