From 7bd37918a359582f97ea5f1bcc2eec37c70065d4 Mon Sep 17 00:00:00 2001 From: Kenneth Anthony Giusti Date: Tue, 22 Jan 2013 21:35:20 +0000 Subject: QPID-4546: review feedback and re-enable federation system tests git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1437188 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/Link.cpp | 14 ++++++++++---- cpp/src/tests/CMakeLists.txt | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'cpp') diff --git a/cpp/src/qpid/broker/Link.cpp b/cpp/src/qpid/broker/Link.cpp index 70d0f68427..5d01a567b5 100644 --- a/cpp/src/qpid/broker/Link.cpp +++ b/cpp/src/qpid/broker/Link.cpp @@ -487,8 +487,9 @@ void Link::ioThreadProcessing() void Link::maintenanceVisit () { Mutex::ScopedLock mutex(lock); - if (state == STATE_WAITING) - { + + switch (state) { + case STATE_WAITING: visitCount++; if (visitCount >= currentInterval) { @@ -501,11 +502,16 @@ void Link::maintenanceVisit () startConnectionLH(); } } - } - else if (state == STATE_OPERATIONAL) { + break; + + case STATE_OPERATIONAL: if ((!active.empty() || !created.empty() || !cancellations.empty()) && connection && connection->isOpen()) connection->requestIOProcessing (boost::bind(&Link::ioThreadProcessing, this)); + break; + + default: // no-op for all other states + break; } } diff --git a/cpp/src/tests/CMakeLists.txt b/cpp/src/tests/CMakeLists.txt index 815b6d1dd6..bc13e2ecdd 100644 --- a/cpp/src/tests/CMakeLists.txt +++ b/cpp/src/tests/CMakeLists.txt @@ -314,6 +314,7 @@ if (PYTHON_EXECUTABLE) add_test (ha_tests ${test_wrap} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/ha_tests.py) add_test (ipv6_test ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/ipv6_test${test_script_suffix}) add_test (federation_tests ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/run_federation_tests${test_script_suffix}) + add_test (federation_sys_tests ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/run_federation_sys_tests${test_script_suffix}) if (BUILD_ACL) add_test (acl_tests ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/run_acl_tests${test_script_suffix}) endif (BUILD_ACL) -- cgit v1.2.1