diff options
Diffstat (limited to 'java/test/Ice/retry')
-rw-r--r-- | java/test/Ice/retry/AllTests.java | 82 | ||||
-rw-r--r-- | java/test/Ice/retry/Client.java | 26 | ||||
-rw-r--r-- | java/test/Ice/retry/RetryI.java | 6 | ||||
-rw-r--r-- | java/test/Ice/retry/Server.java | 20 |
4 files changed, 67 insertions, 67 deletions
diff --git a/java/test/Ice/retry/AllTests.java b/java/test/Ice/retry/AllTests.java index 28385951ee1..e7c2f061ecd 100644 --- a/java/test/Ice/retry/AllTests.java +++ b/java/test/Ice/retry/AllTests.java @@ -94,8 +94,8 @@ public class AllTests public void ice_exception(Ice.LocalException ex) { - test(ex instanceof Ice.ConnectionLostException); - callback.called(); + test(ex instanceof Ice.ConnectionLostException); + callback.called(); } public boolean @@ -115,7 +115,7 @@ public class AllTests String ref = "retry:default -p 12010 -t 10000"; Ice.ObjectPrx base1 = communicator.stringToProxy(ref); test(base1 != null); - Ice.ObjectPrx base2 = communicator.stringToProxy(ref); + Ice.ObjectPrx base2 = communicator.stringToProxy(ref); test(base2 != null); out.println("ok"); @@ -123,51 +123,51 @@ public class AllTests out.flush(); Test.RetryPrx retry1 = Test.RetryPrxHelper.checkedCast(base1); test(retry1 != null); - test(retry1.equals(base1)); + test(retry1.equals(base1)); Test.RetryPrx retry2 = Test.RetryPrxHelper.checkedCast(base2); test(retry2 != null); - test(retry2.equals(base2)); + test(retry2.equals(base2)); out.println("ok"); - out.print("calling regular operation with first proxy... "); - out.flush(); - retry1.op(false); - out.println("ok"); - - out.print("calling operation to kill connection with second proxy... "); - out.flush(); - try - { - retry2.op(true); - test(false); - } - catch(Ice.ConnectionLostException ex) - { - out.println("ok"); - } + out.print("calling regular operation with first proxy... "); + out.flush(); + retry1.op(false); + out.println("ok"); + + out.print("calling operation to kill connection with second proxy... "); + out.flush(); + try + { + retry2.op(true); + test(false); + } + catch(Ice.ConnectionLostException ex) + { + out.println("ok"); + } out.print("calling regular operation with first proxy again... "); out.flush(); - retry1.op(false); - out.println("ok"); - - AMIRegular cb1 = new AMIRegular(); - AMIException cb2 = new AMIException(); - - out.print("calling regular AMI operation with first proxy... "); - retry1.op_async(cb1, false); - test(cb1.check()); - out.println("ok"); - - out.print("calling AMI operation to kill connection with second proxy... "); - retry2.op_async(cb2, true); - test(cb2.check()); - out.println("ok"); - - out.print("calling regular AMI operation with first proxy again... "); - retry1.op_async(cb1, false); - test(cb1.check()); - out.println("ok"); + retry1.op(false); + out.println("ok"); + + AMIRegular cb1 = new AMIRegular(); + AMIException cb2 = new AMIException(); + + out.print("calling regular AMI operation with first proxy... "); + retry1.op_async(cb1, false); + test(cb1.check()); + out.println("ok"); + + out.print("calling AMI operation to kill connection with second proxy... "); + retry2.op_async(cb2, true); + test(cb2.check()); + out.println("ok"); + + out.print("calling regular AMI operation with first proxy again... "); + retry1.op_async(cb1, false); + test(cb1.check()); + out.println("ok"); return retry1; } diff --git a/java/test/Ice/retry/Client.java b/java/test/Ice/retry/Client.java index 3200822416e..d801ad6b535 100644 --- a/java/test/Ice/retry/Client.java +++ b/java/test/Ice/retry/Client.java @@ -25,22 +25,22 @@ public class Client try { - Ice.StringSeqHolder argsH = new Ice.StringSeqHolder(args); - Ice.InitializationData initData = new Ice.InitializationData(); - initData.properties = Ice.Util.createProperties(argsH); + Ice.StringSeqHolder argsH = new Ice.StringSeqHolder(args); + Ice.InitializationData initData = new Ice.InitializationData(); + initData.properties = Ice.Util.createProperties(argsH); - // - // For this test, we want to disable retries. - // - initData.properties.setProperty("Ice.RetryIntervals", "-1"); + // + // For this test, we want to disable retries. + // + initData.properties.setProperty("Ice.RetryIntervals", "-1"); - // - // We don't want connection warnings because of the timeout test. - // - initData.properties.setProperty("Ice.Warn.Connections", "0"); + // + // We don't want connection warnings because of the timeout test. + // + initData.properties.setProperty("Ice.Warn.Connections", "0"); communicator = Ice.Util.initialize(argsH, initData); - + status = run(argsH.value, communicator, System.out); } catch(Ice.LocalException ex) @@ -62,7 +62,7 @@ public class Client } } - System.gc(); + System.gc(); System.exit(status); } } diff --git a/java/test/Ice/retry/RetryI.java b/java/test/Ice/retry/RetryI.java index ef6dfcdc4c7..c8354acdbfa 100644 --- a/java/test/Ice/retry/RetryI.java +++ b/java/test/Ice/retry/RetryI.java @@ -20,9 +20,9 @@ public final class RetryI extends _RetryDisp op(boolean kill, Ice.Current current) { if(kill) - { - current.con.close(true); - } + { + current.con.close(true); + } } public void diff --git a/java/test/Ice/retry/Server.java b/java/test/Ice/retry/Server.java index ae0e79d2886..25cb40a1445 100644 --- a/java/test/Ice/retry/Server.java +++ b/java/test/Ice/retry/Server.java @@ -12,15 +12,15 @@ public class Server public static int run(String[] args, Ice.Communicator communicator, java.io.PrintStream out) { - // - // When running as a MIDlet the properties for the server may be - // overridden by configuration. If it isn't then we assume - // defaults. - // - if(communicator.getProperties().getProperty("Ice.OA.TestAdapter.Endpoints").length() == 0) - { - communicator.getProperties().setProperty("Ice.OA.TestAdapter.Endpoints", "default -p 12010 -t 10000"); - } + // + // When running as a MIDlet the properties for the server may be + // overridden by configuration. If it isn't then we assume + // defaults. + // + if(communicator.getProperties().getProperty("Ice.OA.TestAdapter.Endpoints").length() == 0) + { + communicator.getProperties().setProperty("Ice.OA.TestAdapter.Endpoints", "default -p 12010 -t 10000"); + } Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter"); adapter.add(new RetryI(), communicator.stringToIdentity("retry")); @@ -60,7 +60,7 @@ public class Server } } - System.gc(); + System.gc(); System.exit(status); } } |