diff options
Diffstat (limited to 'cpp/src/tests')
| -rw-r--r-- | cpp/src/tests/.valgrind.supp-default | 18 | ||||
| -rw-r--r-- | cpp/src/tests/ClientSessionTest.cpp | 3 | ||||
| -rw-r--r-- | cpp/src/tests/Session.cpp | 63 | ||||
| -rwxr-xr-x | cpp/src/tests/run_test | 1 |
4 files changed, 22 insertions, 63 deletions
diff --git a/cpp/src/tests/.valgrind.supp-default b/cpp/src/tests/.valgrind.supp-default index 4136e53381..decac01aeb 100644 --- a/cpp/src/tests/.valgrind.supp-default +++ b/cpp/src/tests/.valgrind.supp-default @@ -42,4 +42,22 @@ fun:pthread_create@GLIBC_2.0 fun:_ZN4qpid3sys16AsynchIOAcceptor3runEPNS0_29ConnectionInputHandlerFactoryE } + +{ + Bogus error appearing on Fedora 7. + Memcheck:Cond + fun:_dl_relocate_object + fun:dl_main + fun:_dl_sysdep_start + fun:_dl_start + obj:/lib/ld-2.6.so +} +{ + Bogus error appearing on Fedora 7. + Memcheck:Cond + fun:_dl_relocate_object + fun:dl_open_worker + fun:_dl_catch_error + fun:_dl_open +} diff --git a/cpp/src/tests/ClientSessionTest.cpp b/cpp/src/tests/ClientSessionTest.cpp index 12b50485e4..1d59fbed33 100644 --- a/cpp/src/tests/ClientSessionTest.cpp +++ b/cpp/src/tests/ClientSessionTest.cpp @@ -137,6 +137,9 @@ public: listener.messages.pop_front(); } + + void testSuspendResume() { + } }; // Make this test suite a plugin. diff --git a/cpp/src/tests/Session.cpp b/cpp/src/tests/Session.cpp deleted file mode 100644 index e33ec6e50c..0000000000 --- a/cpp/src/tests/Session.cpp +++ /dev/null @@ -1,63 +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 "qpid/broker/SuspendedSessions.h" - -#define BOOST_AUTO_TEST_MAIN -#include <boost/test/auto_unit_test.hpp> - -using namespace std; -using namespace qpid::framing; -using namespace qpid::broker; -using namespace qpid::sys; - -BOOST_AUTO_TEST_CASE(testSuspendedSessions) { - SuspendedSessions suspended; - - SessionState s; - BOOST_CHECK_EQUAL(s.getState(), SessionState::CLOSED); - s.open(0); - BOOST_CHECK_EQUAL(s.getState(), SessionState::ACTIVE); - BOOST_CHECK(!s.getId().empty()); - suspended.suspend(s); - BOOST_CHECK(s.getState() == SessionState::CLOSED); - try { - s = suspended.resume(s.getId()); - BOOST_FAIL("Expected session to be timed out."); - } catch (...) {} - - s.close(); - s.open(1); // New session, 1 sec timeout. - try { - suspended.resume(s.getId()); - BOOST_FAIL("Expeced exception: non-existent session."); - } catch (...) {} - suspended.suspend(s); - BOOST_CHECK(s.getState() == SessionState::SUSPENDED); - s = suspended.resume(s.getId()); - BOOST_CHECK(s.getState() == SessionState::ACTIVE); - - suspended.suspend(s); // Real timeout - sleep(2); - try { - suspended.resume(s.getId()); - BOOST_FAIL("Expeced timeout."); - } catch (...) {} -} - - diff --git a/cpp/src/tests/run_test b/cpp/src/tests/run_test index d717cd2ace..615e8132f1 100755 --- a/cpp/src/tests/run_test +++ b/cpp/src/tests/run_test @@ -36,6 +36,7 @@ if grep -l "^# Generated by .*libtool" "$1" >/dev/null 2>&1; then test -n "$VALGRIND" && vg_check else # This is a non-libtool shell script, just execute it. + export VALGRIND srcdir exec "$@" fi |
