summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/operations/BatchOneways.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2014-06-27 10:31:41 +0200
committerBenoit Foucher <benoit@zeroc.com>2014-06-27 10:31:41 +0200
commita4f93259dc3494d98addf38e69b87eb557d432b3 (patch)
treed2b78bb5cea24e33dc1b46be22dba6167e96c9ed /cpp/test/Ice/operations/BatchOneways.cpp
parentFix for ICE-5515 (ice_staticId on proxies) in Java, C#, Python, Ruby and PHP ... (diff)
downloadice-a4f93259dc3494d98addf38e69b87eb557d432b3.tar.bz2
ice-a4f93259dc3494d98addf38e69b87eb557d432b3.tar.xz
ice-a4f93259dc3494d98addf38e69b87eb557d432b3.zip
Better collocation optimization, fix for ICE-5489, ICE-5484
Diffstat (limited to 'cpp/test/Ice/operations/BatchOneways.cpp')
-rw-r--r--cpp/test/Ice/operations/BatchOneways.cpp61
1 files changed, 33 insertions, 28 deletions
diff --git a/cpp/test/Ice/operations/BatchOneways.cpp b/cpp/test/Ice/operations/BatchOneways.cpp
index bbf22e35e21..9916a7f1243 100644
--- a/cpp/test/Ice/operations/BatchOneways.cpp
+++ b/cpp/test/Ice/operations/BatchOneways.cpp
@@ -47,7 +47,9 @@ batchOneways(const Test::MyClassPrx& p)
}
Test::MyClassPrx batch = Test::MyClassPrx::uncheckedCast(p->ice_batchOneway());
-
+ batch->ice_flushBatchRequests();
+ batch->end_ice_flushBatchRequests(batch->begin_ice_flushBatchRequests());
+
int i;
for(i = 0 ; i < 30 ; ++i)
@@ -62,40 +64,43 @@ batchOneways(const Test::MyClassPrx& p)
}
}
- batch->ice_getConnection()->flushBatchRequests();
+ if(batch->ice_getConnection())
+ {
+ batch->ice_getConnection()->flushBatchRequests();
- Test::MyClassPrx batch2 = Test::MyClassPrx::uncheckedCast(p->ice_batchOneway());
+ Test::MyClassPrx batch2 = Test::MyClassPrx::uncheckedCast(p->ice_batchOneway());
- batch->ice_ping();
- batch2->ice_ping();
- batch->ice_flushBatchRequests();
- batch->ice_getConnection()->close(false);
- batch->ice_ping();
- batch2->ice_ping();
+ batch->ice_ping();
+ batch2->ice_ping();
+ batch->ice_flushBatchRequests();
+ batch->ice_getConnection()->close(false);
+ batch->ice_ping();
+ batch2->ice_ping();
- batch->ice_getConnection();
- batch2->ice_getConnection();
+ batch->ice_getConnection();
+ batch2->ice_getConnection();
- batch->ice_ping();
- batch->ice_getConnection()->close(false);
- try
- {
batch->ice_ping();
- test(false);
- }
- catch(const Ice::CloseConnectionException&)
- {
- }
- try
- {
+ batch->ice_getConnection()->close(false);
+ try
+ {
+ batch->ice_ping();
+ test(false);
+ }
+ catch(const Ice::CloseConnectionException&)
+ {
+ }
+ try
+ {
+ batch2->ice_ping();
+ test(false);
+ }
+ catch(const Ice::CloseConnectionException&)
+ {
+ }
+ batch->ice_ping();
batch2->ice_ping();
- test(false);
- }
- catch(const Ice::CloseConnectionException&)
- {
}
- batch->ice_ping();
- batch2->ice_ping();
Ice::Identity identity;
identity.name = "invalid";