summaryrefslogtreecommitdiff
path: root/java/test/Ice/retry/Collocated.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/test/Ice/retry/Collocated.java')
-rw-r--r--java/test/Ice/retry/Collocated.java57
1 files changed, 57 insertions, 0 deletions
diff --git a/java/test/Ice/retry/Collocated.java b/java/test/Ice/retry/Collocated.java
new file mode 100644
index 00000000000..388d6888f30
--- /dev/null
+++ b/java/test/Ice/retry/Collocated.java
@@ -0,0 +1,57 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+package test.Ice.retry;
+
+import test.Ice.retry.Test.RetryPrx;
+
+public class Collocated extends test.Util.Application
+{
+ public int run(String[] args)
+ {
+ Ice.Communicator communicator = communicator();
+ Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
+ adapter.add(new RetryI(), communicator.stringToIdentity("retry"));
+ //adapter.activate();
+
+ RetryPrx retry = AllTests.allTests(communicator, getWriter());
+ retry.shutdown();
+ return 0;
+ }
+
+ protected Ice.InitializationData getInitData(Ice.StringSeqHolder argsH)
+ {
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties(argsH);
+ initData.observer = Instrumentation.getObserver();
+
+ initData.properties.setProperty("Ice.Package.Test", "test.Ice.retry");
+
+ initData.properties.setProperty("Ice.RetryIntervals", "0 10 20 30");
+
+ //
+ // We don't want connection warnings because of the timeout
+ //
+ initData.properties.setProperty("Ice.Warn.Connections", "0");
+ initData.properties.setProperty("Ice.Warn.Dispatch", "0");
+
+ initData.properties.setProperty("TestAdapter.Endpoints", "default -p 12010");
+
+ return initData;
+ }
+
+ public static void main(String[] args)
+ {
+ Collocated app = new Collocated();
+ int result = app.main("Client", args);
+ System.gc();
+ System.exit(result);
+ }
+}
+