From: tho Date: Tue, 28 Sep 2010 08:09:27 +0000 (+0000) Subject: PPI: fix for PassiveQueueingSocketSink unit test X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=7ff7da07bed3e753a06858c0c6fcb2b9e8c260f9;p=senf.git PPI: fix for PassiveQueueingSocketSink unit test git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1721 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/PPI/QueueingSocketSink.test.cc b/senf/PPI/QueueingSocketSink.test.cc index 972d1ee..9d9268f 100644 --- a/senf/PPI/QueueingSocketSink.test.cc +++ b/senf/PPI/QueueingSocketSink.test.cc @@ -84,7 +84,7 @@ namespace { SENF_AUTO_UNIT_TEST(passiveQueueingSocketSink) { - senf::ConnectedUDPv4ClientSocketHandle os(senf::noinit); + senf::ConnectedUDPv4ClientSocketHandle os (senf::noinit); senf::ConnectedUDPv4ClientSocketHandle outputSocket ( senf::INet4SocketAddress( localhost4str(0))); @@ -116,7 +116,7 @@ SENF_AUTO_UNIT_TEST(passiveQueueingSocketSink) source.submit(p); BOOST_CHECK_EQUAL( udpSink.qAlgorithm().size(), 1); - for( int n = 0; n < 100; n++){ + for( int n = 0; n < 100; n++) { source.submit(p); } // queue default size is 64 @@ -126,8 +126,12 @@ SENF_AUTO_UNIT_TEST(passiveQueueingSocketSink) runPPI( senf::ClockService::milliseconds(200)); - input = inputSocket.read(); - BOOST_CHECK_EQUAL( data, input ); + inputSocket.blocking(false); + while (true) { + input = inputSocket.read(); + if (input.empty()) break; + BOOST_CHECK_EQUAL( data, input ); + } BOOST_CHECK_EQUAL( udpSink.qAlgorithm().size(), 0); } diff --git a/tools/senf.dict b/tools/senf.dict index 7b07341..97c7165 100644 --- a/tools/senf.dict +++ b/tools/senf.dict @@ -636,6 +636,7 @@ SystemException TapSocketHandle TargetInterface td +telnet templated thorsten ThresholdQueueing