summaryrefslogtreecommitdiff
path: root/java/test/Ice/exceptions/Collocated.java
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2009-03-24 12:31:31 -0230
committerMatthew Newhook <matthew@zeroc.com>2009-03-24 12:31:31 -0230
commit4cc5d77c383b6c91c3af9fe44df9687bb9b15580 (patch)
tree64ce3d6cf35b15497de50f298f7225a8c72f64b6 /java/test/Ice/exceptions/Collocated.java
parentMerge commit 'origin/R3_3_branch' (diff)
downloadice-4cc5d77c383b6c91c3af9fe44df9687bb9b15580.tar.bz2
ice-4cc5d77c383b6c91c3af9fe44df9687bb9b15580.tar.xz
ice-4cc5d77c383b6c91c3af9fe44df9687bb9b15580.zip
Merged android-testsuite branch.
Diffstat (limited to 'java/test/Ice/exceptions/Collocated.java')
-rw-r--r--java/test/Ice/exceptions/Collocated.java53
1 files changed, 20 insertions, 33 deletions
diff --git a/java/test/Ice/exceptions/Collocated.java b/java/test/Ice/exceptions/Collocated.java
index cf4295f44b2..52222997412 100644
--- a/java/test/Ice/exceptions/Collocated.java
+++ b/java/test/Ice/exceptions/Collocated.java
@@ -7,51 +7,38 @@
//
// **********************************************************************
-public class Collocated
+package test.Ice.exceptions;
+
+public class Collocated extends test.Util.Application
{
- private static int
- run(String[] args, Ice.Communicator communicator)
+ public int
+ run(String[] args)
{
- communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
+ Ice.Communicator communicator = communicator();
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new ThrowerI(adapter);
adapter.add(object, communicator.stringToIdentity("thrower"));
- AllTests.allTests(communicator, true);
+ AllTests.allTests(communicator, true, getWriter());
return 0;
}
+ protected Ice.InitializationData getInitData(Ice.StringSeqHolder argsH)
+ {
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties(argsH);
+ initData.properties.setProperty("Ice.Package.Test", "test.Ice.exceptions");
+ initData.properties.setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
+ return initData;
+ }
+
public static void
main(String[] args)
{
- int status = 0;
- Ice.Communicator communicator = null;
-
- try
- {
- communicator = Ice.Util.initialize(args);
- status = run(args, communicator);
- }
- catch(Exception ex)
- {
- ex.printStackTrace();
- status = 1;
- }
-
- if(communicator != null)
- {
- try
- {
- communicator.destroy();
- }
- catch(Ice.LocalException ex)
- {
- ex.printStackTrace();
- status = 1;
- }
- }
-
- System.exit(status);
+ Collocated app = new Collocated();
+ int result = app.main("Collocated", args);
+ System.gc();
+ System.exit(result);
}
}