diff options
author | Mark Spruiell <mes@zeroc.com> | 2003-05-24 04:33:50 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2003-05-24 04:33:50 +0000 |
commit | 9a9f178b9ebbf69e0d8542444d0352c6b3753515 (patch) | |
tree | 6a6630d9e6af91e4d506b656693b5f25da00f581 /java/test/Ice/custom/Collocated.java | |
parent | adding generic sequence patchers (diff) | |
download | ice-9a9f178b9ebbf69e0d8542444d0352c6b3753515.tar.bz2 ice-9a9f178b9ebbf69e0d8542444d0352c6b3753515.tar.xz ice-9a9f178b9ebbf69e0d8542444d0352c6b3753515.zip |
adding test for custom sequence types
Diffstat (limited to 'java/test/Ice/custom/Collocated.java')
-rw-r--r-- | java/test/Ice/custom/Collocated.java | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/java/test/Ice/custom/Collocated.java b/java/test/Ice/custom/Collocated.java new file mode 100644 index 00000000000..a14fd8df870 --- /dev/null +++ b/java/test/Ice/custom/Collocated.java @@ -0,0 +1,62 @@ +// ********************************************************************** +// +// Copyright (c) 2003 +// ZeroC, Inc. +// Billerica, MA, USA +// +// All Rights Reserved. +// +// Ice is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License version 2 as published by +// the Free Software Foundation. +// +// ********************************************************************** + +public class Collocated +{ + private static int + run(String[] args, Ice.Communicator communicator) + { + communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12345 -t 2000"); + Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter"); + Ice.Object test = new TestI(communicator); + adapter.add(test, Ice.Util.stringToIdentity("test")); + + AllTests.allTests(communicator); + + return 0; + } + + public static void + main(String[] args) + { + int status = 0; + Ice.Communicator communicator = null; + + try + { + communicator = Ice.Util.initialize(args); + status = run(args, communicator); + } + catch(Ice.LocalException ex) + { + ex.printStackTrace(); + status = 1; + } + + if(communicator != null) + { + try + { + communicator.destroy(); + } + catch(Ice.LocalException ex) + { + ex.printStackTrace(); + status = 1; + } + } + + System.exit(status); + } +} |