From aebe0af1cd0291a271ec6c2763c37b829b4b8075 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Fri, 23 Mar 2012 14:24:56 +0000 Subject: tubes: push sent packets onto the incoming queue. This ensures that our changes are echoed locally as well as being sent to the peer. --- tubes/qa/test_manager.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tubes/qa') diff --git a/tubes/qa/test_manager.cxx b/tubes/qa/test_manager.cxx index a7e690fae1f6..f76353d70f00 100644 --- a/tubes/qa/test_manager.cxx +++ b/tubes/qa/test_manager.cxx @@ -279,6 +279,11 @@ void TestTeleTubes::testReceivePacket() TelePacket aPacket( "", RTL_CONSTASCII_STRINGPARAM( "from 1 to 2")); TelePacket aReceived; sal_uInt32 nReceivedPackets = 0; + /* We expect to get every packet we send pushed onto the queue to be echoed + * locally; and since we are also listening at the "other end", we expect + * to receive a copy of each packet as well. + */ + sal_uInt32 nExpectedPackets = nSentPackets * 2; bool bOk; do { @@ -291,10 +296,10 @@ void TestTeleTubes::testReceivePacket() CPPUNIT_ASSERT( aPacket == aReceived); } } while (bOk); - if (nReceivedPackets < nSentPackets) + if (nReceivedPackets < nExpectedPackets) mpManager1->iterateLoop(); - } while (nReceivedPackets < nSentPackets); - CPPUNIT_ASSERT( nReceivedPackets == nSentPackets); + } while (nReceivedPackets < nExpectedPackets); + CPPUNIT_ASSERT( nReceivedPackets == nExpectedPackets); } void TestTeleTubes::FileSent( bool success, void *user_data) -- cgit