summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/background/AllTests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/background/AllTests.cpp')
-rw-r--r--cpp/test/Ice/background/AllTests.cpp50
1 files changed, 43 insertions, 7 deletions
diff --git a/cpp/test/Ice/background/AllTests.cpp b/cpp/test/Ice/background/AllTests.cpp
index 5da5b39ee7b..1f2c9e6b6b1 100644
--- a/cpp/test/Ice/background/AllTests.cpp
+++ b/cpp/test/Ice/background/AllTests.cpp
@@ -245,13 +245,13 @@ void readWriteTests(const ConfigurationPtr&, const Test::BackgroundPrx&, const T
BackgroundPrx
allTests(const Ice::CommunicatorPtr& communicator)
{
- string sref = "background:default -p 12010 -t 10000";
+ string sref = "background:default -p 12010 -t 20000";
Ice::ObjectPrx obj = communicator->stringToProxy(sref);
test(obj);
BackgroundPrx background = BackgroundPrx::uncheckedCast(obj);
- sref = "backgroundController:tcp -p 12011 -t 10000";
+ sref = "backgroundController:tcp -p 12011 -t 20000";
obj = communicator->stringToProxy(sref);
test(obj);
@@ -701,6 +701,11 @@ validationTests(const ConfigurationPtr& configuration,
{
configuration->readException(0);
}
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ test(false);
+ }
OpExAMICallbackPtr cbEx = new OpExAMICallback();
@@ -743,6 +748,11 @@ validationTests(const ConfigurationPtr& configuration,
configuration->readException(0);
configuration->readReady(true);
}
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ test(false);
+ }
configuration->readReady(false);
configuration->readException(new Ice::SocketException(__FILE__, __LINE__));
@@ -781,6 +791,11 @@ validationTests(const ConfigurationPtr& configuration,
{
ctl->writeException(false);
}
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ test(false);
+ }
try
{
@@ -809,7 +824,11 @@ validationTests(const ConfigurationPtr& configuration,
ctl->writeException(false);
ctl->writeReady(true);
}
-
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ test(false);
+ }
Ice::ByteSeq seq;
seq.resize(512 * 1024);
@@ -833,7 +852,15 @@ validationTests(const ConfigurationPtr& configuration,
backgroundBatchOneway->op();
backgroundBatchOneway->op();
ctl->resumeAdapter();
- backgroundBatchOneway->ice_flushBatchRequests();
+ try
+ {
+ backgroundBatchOneway->ice_flushBatchRequests();
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ test(false);
+ }
//
// Send bigger requests to test with auto-flushing.
@@ -853,7 +880,15 @@ validationTests(const ConfigurationPtr& configuration,
backgroundBatchOneway->opWithPayload(seq);
backgroundBatchOneway->opWithPayload(seq);
ctl->resumeAdapter();
- backgroundBatchOneway->ice_flushBatchRequests();
+ try
+ {
+ backgroundBatchOneway->ice_flushBatchRequests();
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ test(false);
+ }
//
// Then try the same thing with async flush.
@@ -874,7 +909,8 @@ validationTests(const ConfigurationPtr& configuration,
backgroundBatchOneway->op();
backgroundBatchOneway->op();
ctl->resumeAdapter();
- backgroundBatchOneway->ice_flushBatchRequests_async(new FlushBatchRequestsCallback());
+ FlushBatchRequestsCallbackPtr fcb = new FlushBatchRequestsCallback();
+ backgroundBatchOneway->ice_flushBatchRequests_async(fcb);
backgroundBatchOneway->ice_getConnection()->close(false);
backgroundBatchOneway->ice_getConnection()->close(false);
@@ -892,7 +928,7 @@ validationTests(const ConfigurationPtr& configuration,
backgroundBatchOneway->opWithPayload(seq);
backgroundBatchOneway->opWithPayload(seq);
ctl->resumeAdapter();
- FlushBatchRequestsCallbackPtr fcb = new FlushBatchRequestsCallback();
+ fcb = new FlushBatchRequestsCallback();
backgroundBatchOneway->ice_flushBatchRequests_async(fcb);
//
// We can't close the connection before ensuring all the batches have been sent since