summaryrefslogtreecommitdiff
path: root/tubes/qa
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2012-03-23 14:24:56 +0000
committerMatúš Kukan <matus.kukan@gmail.com>2012-07-17 16:39:52 +0200
commitaebe0af1cd0291a271ec6c2763c37b829b4b8075 (patch)
tree471f15e387068291ece5ca7d2eeb1fb12c1b23a9 /tubes/qa
parentc0d0ad8818d4172c34d8ce82bab0ed582ab6ea90 (diff)
tubes: push sent packets onto the incoming queue.
This ensures that our changes are echoed locally as well as being sent to the peer.
Diffstat (limited to 'tubes/qa')
-rw-r--r--tubes/qa/test_manager.cxx11
1 files changed, 8 insertions, 3 deletions
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)