diff options
author | Alan Conway <aconway@apache.org> | 2007-03-28 21:45:06 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2007-03-28 21:45:06 +0000 |
commit | 2c23ceed57ebc9a1e307e1e6ab25c1031d6256eb (patch) | |
tree | 3ec2c785ff7a2c9419e9a7bc45085da119437cdd /cpp/tests/AcceptorTest.cpp | |
parent | de9dbb7945596eeadc54995cb7b9e48339fa6731 (diff) | |
download | qpid-python-2c23ceed57ebc9a1e307e1e6ab25c1031d6256eb.tar.gz |
* cpp/tests/run-unit-tests,setup: use valgrind --log-file rather than
redirecting stderr. Redirecting also swallows DllPlugInTester output.
* cpp/lib/common/sys/Acceptor.h: getPort() to return uint16_t, not int16t.
Note AcceptorTest is not inclued in Makefile.am. I fixed it to compile
but it hangs, need to determine if it's a test or an Acceptor bug.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@523473 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/tests/AcceptorTest.cpp')
-rw-r--r-- | cpp/tests/AcceptorTest.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cpp/tests/AcceptorTest.cpp b/cpp/tests/AcceptorTest.cpp index 34a51888d4..947ae2d11a 100644 --- a/cpp/tests/AcceptorTest.cpp +++ b/cpp/tests/AcceptorTest.cpp @@ -49,9 +49,10 @@ class AcceptorTest : public CppUnit::TestCase, private Runnable Acceptor::shared_ptr acceptor; public: - + using TestCase::run; // Avoid hiding TestCase::run. + void run() { - acceptor->run(factory); + acceptor->run(&factory); } void setUp() { @@ -65,7 +66,7 @@ class AcceptorTest : public CppUnit::TestCase, private Runnable void testAccept() { int port = acceptor->getPort(); - CPPUNIT_ASSERT(port > 0); + CPPUNIT_ASSERT(port != 0); Thread runThread(*this); // Connect to the acceptor Socket client = Socket::createTcp(); @@ -84,7 +85,9 @@ class AcceptorTest : public CppUnit::TestCase, private Runnable CPPUNIT_ASSERT_EQUAL(int(2), int(init.getMinor())); acceptor->shutdown(); - runThread.join(); + printf("== join\n"); // FIXME aconway 2007-03-28: + runThread.join(); + printf("== joined\n"); // FIXME aconway 2007-03-28: factory.handler->waitForClosed(); } }; |