summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/test/src/main/java/test/Ice/operations/BatchOneways.java14
-rw-r--r--java/test/src/main/java/test/Ice/operations/BatchOnewaysAMI.java8
-rw-r--r--java/test/src/main/java/test/Ice/proxy/AllTests.java14
3 files changed, 20 insertions, 16 deletions
diff --git a/java/test/src/main/java/test/Ice/operations/BatchOneways.java b/java/test/src/main/java/test/Ice/operations/BatchOneways.java
index d7c9047a65b..f1747f75ac1 100644
--- a/java/test/src/main/java/test/Ice/operations/BatchOneways.java
+++ b/java/test/src/main/java/test/Ice/operations/BatchOneways.java
@@ -69,6 +69,8 @@ class BatchOneways
static void batchOneways(test.Util.Application app, MyClassPrx p, PrintWriter out)
{
+ final com.zeroc.Ice.Communicator communicator = app.communicator();
+ final com.zeroc.Ice.Properties properties = communicator.getProperties();
final byte[] bs1 = new byte[10 * 1024];
MyClassPrx batch = p.ice_batchOneway();
@@ -77,7 +79,7 @@ class BatchOneways
{
batch.ice_getConnection().flushBatchRequests(com.zeroc.Ice.CompressBatch.BasedOnProxy);
}
- batch.ice_getCommunicator().flushBatchRequests(com.zeroc.Ice.CompressBatch.BasedOnProxy);
+ communicator.flushBatchRequests(com.zeroc.Ice.CompressBatch.BasedOnProxy);
p.opByteSOnewayCallCount(); // Reset the call count
@@ -106,7 +108,8 @@ class BatchOneways
}
}
- if(batch.ice_getConnection() != null)
+ final boolean bluetooth = properties.getProperty("Ice.Default.Protocol").indexOf("bt") == 0;
+ if(batch.ice_getConnection() != null && !bluetooth)
{
MyClassPrx batch1 = p.ice_batchOneway();
MyClassPrx batch2 = p.ice_batchOneway();
@@ -139,10 +142,10 @@ class BatchOneways
batch.ice_flushBatchRequests();
batch.ice_ping();
- if(batch.ice_getConnection() != null)
+ if(batch.ice_getConnection() != null && !bluetooth)
{
com.zeroc.Ice.InitializationData initData = app.createInitializationData();
- initData.properties = p.ice_getCommunicator().getProperties()._clone();
+ initData.properties = properties._clone();
BatchRequestInterceptorI interceptor = new BatchRequestInterceptorI();
initData.batchRequestInterceptor = interceptor;
com.zeroc.Ice.Communicator ic = app.initialize(initData);
@@ -178,8 +181,7 @@ class BatchOneways
}
p.ice_ping();
- if(p.ice_getConnection() != null &&
- p.ice_getCommunicator().getProperties().getProperty("Ice.Override.Compress").equals(""))
+ if(p.ice_getConnection() != null && properties.getProperty("Ice.Override.Compress").equals(""))
{
com.zeroc.Ice.ObjectPrx prx = p.ice_getConnection().createProxy(p.ice_getIdentity()).ice_batchOneway();
diff --git a/java/test/src/main/java/test/Ice/operations/BatchOnewaysAMI.java b/java/test/src/main/java/test/Ice/operations/BatchOnewaysAMI.java
index 5f3e58c6256..0ea4e83422f 100644
--- a/java/test/src/main/java/test/Ice/operations/BatchOnewaysAMI.java
+++ b/java/test/src/main/java/test/Ice/operations/BatchOnewaysAMI.java
@@ -61,6 +61,8 @@ class BatchOnewaysAMI
static void batchOneways(MyClassPrx p, PrintWriter out)
{
+ final com.zeroc.Ice.Communicator communicator = p.ice_getCommunicator();
+ final com.zeroc.Ice.Properties properties = communicator.getProperties();
final byte[] bs1 = new byte[10 * 1024];
MyClassPrx batch = p.ice_batchOneway();
@@ -93,7 +95,8 @@ class BatchOnewaysAMI
}
}
- if(batch.ice_getConnection() != null)
+ final boolean bluetooth = properties.getProperty("Ice.Default.Protocol").indexOf("bt") == 0;
+ if(batch.ice_getConnection() != null && !bluetooth)
{
MyClassPrx batch2 = p.ice_batchOneway();
@@ -119,8 +122,7 @@ class BatchOnewaysAMI
batch3.ice_pingAsync();
batch3.ice_flushBatchRequestsAsync().join();
- // Make sure that a bogus batch request doesn't cause troubles to other
- // ones.
+ // Make sure that a bogus batch request doesn't cause troubles to other ones.
batch3.ice_pingAsync();
batch.ice_pingAsync();
batch.ice_flushBatchRequestsAsync().join();
diff --git a/java/test/src/main/java/test/Ice/proxy/AllTests.java b/java/test/src/main/java/test/Ice/proxy/AllTests.java
index b6e88a79700..9902fd34087 100644
--- a/java/test/src/main/java/test/Ice/proxy/AllTests.java
+++ b/java/test/src/main/java/test/Ice/proxy/AllTests.java
@@ -419,7 +419,7 @@ public class AllTests
property = propertyPrefix + ".Locator";
test(b1.ice_getLocator() == null);
- prop.setProperty(property, "locator:default -p 10000");
+ prop.setProperty(property, "locator:tcp -p 10000");
b1 = communicator.propertyToProxy(propertyPrefix);
test(b1.ice_getLocator() != null && b1.ice_getLocator().ice_getIdentity().name.equals("locator"));
prop.setProperty(property, "");
@@ -434,7 +434,7 @@ public class AllTests
// Now retest with an indirect proxy.
prop.setProperty(propertyPrefix, "test");
property = propertyPrefix + ".Locator";
- prop.setProperty(property, "locator:default -p 10000");
+ prop.setProperty(property, "locator:tcp -p 10000");
b1 = communicator.propertyToProxy(propertyPrefix);
test(b1.ice_getLocator() != null && b1.ice_getLocator().ice_getIdentity().name.equals("locator"));
prop.setProperty(property, "");
@@ -458,7 +458,7 @@ public class AllTests
property = propertyPrefix + ".Router";
test(b1.ice_getRouter() == null);
- prop.setProperty(property, "router:default -p 10000");
+ prop.setProperty(property, "router:tcp -p 10000");
b1 = communicator.propertyToProxy(propertyPrefix);
test(b1.ice_getRouter() != null && b1.ice_getRouter().ice_getIdentity().name.equals("router"));
prop.setProperty(property, "");
@@ -730,9 +730,9 @@ public class AllTests
test(!compObj.ice_timeout(10).equals(compObj.ice_timeout(20)));
com.zeroc.Ice.LocatorPrx loc1 =
- com.zeroc.Ice.LocatorPrx.uncheckedCast(communicator.stringToProxy("loc1:default -p 10000"));
+ com.zeroc.Ice.LocatorPrx.uncheckedCast(communicator.stringToProxy("loc1:tcp -p 10000"));
com.zeroc.Ice.LocatorPrx loc2 =
- com.zeroc.Ice.LocatorPrx.uncheckedCast(communicator.stringToProxy("loc2:default -p 10000"));
+ com.zeroc.Ice.LocatorPrx.uncheckedCast(communicator.stringToProxy("loc2:tcp -p 10000"));
test(compObj.ice_locator(null).equals(compObj.ice_locator(null)));
test(compObj.ice_locator(loc1).equals(compObj.ice_locator(loc1)));
test(!compObj.ice_locator(loc1).equals(compObj.ice_locator(null)));
@@ -740,9 +740,9 @@ public class AllTests
test(!compObj.ice_locator(loc1).equals(compObj.ice_locator(loc2)));
com.zeroc.Ice.RouterPrx rtr1 =
- com.zeroc.Ice.RouterPrx.uncheckedCast(communicator.stringToProxy("rtr1:default -p 10000"));
+ com.zeroc.Ice.RouterPrx.uncheckedCast(communicator.stringToProxy("rtr1:tcp -p 10000"));
com.zeroc.Ice.RouterPrx rtr2 =
- com.zeroc.Ice.RouterPrx.uncheckedCast(communicator.stringToProxy("rtr2:default -p 10000"));
+ com.zeroc.Ice.RouterPrx.uncheckedCast(communicator.stringToProxy("rtr2:tcp -p 10000"));
test(compObj.ice_router(null).equals(compObj.ice_router(null)));
test(compObj.ice_router(rtr1).equals(compObj.ice_router(rtr1)));
test(!compObj.ice_router(rtr1).equals(compObj.ice_router(null)));