diff options
Diffstat (limited to 'cpp/test/Ice/operations/BatchOneways.cpp')
-rw-r--r-- | cpp/test/Ice/operations/BatchOneways.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/cpp/test/Ice/operations/BatchOneways.cpp b/cpp/test/Ice/operations/BatchOneways.cpp index 97dad6c84c7..62baee3653b 100644 --- a/cpp/test/Ice/operations/BatchOneways.cpp +++ b/cpp/test/Ice/operations/BatchOneways.cpp @@ -18,7 +18,6 @@ batchOneways(const Test::MyClassPrx& p) { const Test::ByteS bs1(10 * 1024); const Test::ByteS bs2(99 * 1024); - const Test::ByteS bs3(100 * 1024); try { p->opByteSOneway(bs1); @@ -37,32 +36,30 @@ batchOneways(const Test::MyClassPrx& p) test(false); } - try - { - p->opByteSOneway(bs3); - test(false); - } - catch(const Ice::MemoryLimitException&) - { - } - Test::MyClassPrx batch = Test::MyClassPrx::uncheckedCast(p->ice_batchOneway()); batch->ice_flushBatchRequests(); int i; - + p->opByteSOnewayCallCount(); // Reset the call count for(i = 0 ; i < 30 ; ++i) { try { batch->opByteSOneway(bs1); } - catch(const Ice::MemoryLimitException&) + catch(const Ice::LocalException&) { test(false); } } + int count = 0; + while(count != 27) // 3 * 9 requests auto-flushed. + { + count += p->opByteSOnewayCallCount(); + IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(10)); + } + if(batch->ice_getConnection()) { batch->ice_getConnection()->flushBatchRequests(); |