diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-03-14 12:47:12 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-03-14 12:47:12 +0000 |
commit | 4ec329c60555de5562c72df0e2fc583d591bf84d (patch) | |
tree | 86eb4af9aac33fc6277bed19d8936c4ffdbcd2d5 /java/test/Ice/retry/Client.java | |
parent | Fixed http://www.zeroc.com/vbulletin/showthread.php?p=9533#post9533 (diff) | |
download | ice-4ec329c60555de5562c72df0e2fc583d591bf84d.tar.bz2 ice-4ec329c60555de5562c72df0e2fc583d591bf84d.tar.xz ice-4ec329c60555de5562c72df0e2fc583d591bf84d.zip |
Ported fix for bug 574.
Diffstat (limited to 'java/test/Ice/retry/Client.java')
-rw-r--r-- | java/test/Ice/retry/Client.java | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/java/test/Ice/retry/Client.java b/java/test/Ice/retry/Client.java new file mode 100644 index 00000000000..49b9f330b9a --- /dev/null +++ b/java/test/Ice/retry/Client.java @@ -0,0 +1,67 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved. +// +// This copy of Ice-E is licensed to you under the terms described in the +// ICEE_LICENSE file included in this distribution. +// +// ********************************************************************** + +public class Client +{ + public static int + run(String[] args, Ice.Communicator communicator, java.io.PrintStream out) + { + Test.RetryPrx retry = AllTests.allTests(communicator, out); + retry.shutdown(); + return 0; + } + + public static void + main(String[] args) + { + int status = 0; + Ice.Communicator communicator = null; + + try + { + Ice.StringSeqHolder argsH = new Ice.StringSeqHolder(args); + Ice.Properties properties = Ice.Util.getDefaultProperties(argsH); + + // + // For this test, we want to disable retries. + // + properties.setProperty("Ice.RetryIntervals", "-1"); + + communicator = Ice.Util.initialize(argsH); + + // + // We don't want connection warnings because of the timeout test. + // + properties.setProperty("Ice.Warn.Connections", "0"); + + status = run(argsH.value, communicator, System.out); + } + catch(Ice.LocalException ex) + { + ex.printStackTrace(); + status = 1; + } + + if(communicator != null) + { + try + { + communicator.destroy(); + } + catch(Ice.LocalException ex) + { + ex.printStackTrace(); + status = 1; + } + } + + System.gc(); + System.exit(status); + } +} |