summaryrefslogtreecommitdiff
path: root/csharp/test/Ice/dispatcher/Collocated.cs
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2018-06-01 17:41:03 +0200
committerJose <jose@zeroc.com>2018-06-01 17:41:03 +0200
commitcbe92e540a7f02f0bdf93192424bd119189365b7 (patch)
tree411c50dc0ae9c669d31a940b1b4903b5deac4f12 /csharp/test/Ice/dispatcher/Collocated.cs
parentFixed Util.py check for binary installation directory on Windows (diff)
downloadice-cbe92e540a7f02f0bdf93192424bd119189365b7.tar.bz2
ice-cbe92e540a7f02f0bdf93192424bd119189365b7.tar.xz
ice-cbe92e540a7f02f0bdf93192424bd119189365b7.zip
Do not use Ice::Application for Ice testsuite
Diffstat (limited to 'csharp/test/Ice/dispatcher/Collocated.cs')
-rw-r--r--csharp/test/Ice/dispatcher/Collocated.cs58
1 files changed, 28 insertions, 30 deletions
diff --git a/csharp/test/Ice/dispatcher/Collocated.cs b/csharp/test/Ice/dispatcher/Collocated.cs
index f432417592a..5f19c76404f 100644
--- a/csharp/test/Ice/dispatcher/Collocated.cs
+++ b/csharp/test/Ice/dispatcher/Collocated.cs
@@ -16,44 +16,42 @@ using System.Reflection;
[assembly: AssemblyDescription("Ice test")]
[assembly: AssemblyCompany("ZeroC, Inc.")]
-public class Collocated : TestCommon.Application
+public class Collocated : Test.TestHelper
{
- public override int run(string[] args)
+ public override void run(string[] args)
{
- communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0));
- communicator().getProperties().setProperty("ControllerAdapter.Endpoints", getTestEndpoint(1));
- communicator().getProperties().setProperty("ControllerAdapter.ThreadPool.Size", "1");
-
- Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter");
- Ice.ObjectAdapter adapter2 = communicator().createObjectAdapter("ControllerAdapter");
-
- adapter.add(new TestI(), Ice.Util.stringToIdentity("test"));
- //adapter.activate(); // Don't activate OA to ensure collocation is used.
- adapter2.add(new TestControllerI(adapter), Ice.Util.stringToIdentity("testController"));
- //adapter2.activate(); // Don't activate OA to ensure collocation is used.
-
- AllTests.allTests(this);
- return 0;
- }
-
- protected override Ice.InitializationData getInitData(ref string[] args)
- {
- Ice.InitializationData initData = base.getInitData(ref args);
- initData.properties.setProperty("Ice.Warn.AMICallback", "0");
- initData.dispatcher = new Dispatcher().dispatch;
- return initData;
- }
-
- public static int Main(string[] args)
- {
- Collocated app = new Collocated();
try
{
- return app.runmain(args);
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = createTestProperties(ref args);
+ initData.properties.setProperty("Ice.Warn.AMICallback", "0");
+ initData.dispatcher = new Dispatcher().dispatch;
+
+ using(var communicator = initialize(initData))
+ {
+ communicator.getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0));
+ communicator.getProperties().setProperty("ControllerAdapter.Endpoints", getTestEndpoint(1));
+ communicator.getProperties().setProperty("ControllerAdapter.ThreadPool.Size", "1");
+
+ Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
+ Ice.ObjectAdapter adapter2 = communicator.createObjectAdapter("ControllerAdapter");
+
+ adapter.add(new TestI(), Ice.Util.stringToIdentity("test"));
+ //adapter.activate(); // Don't activate OA to ensure collocation is used.
+ adapter2.add(new TestControllerI(adapter), Ice.Util.stringToIdentity("testController"));
+ //adapter2.activate(); // Don't activate OA to ensure collocation is used.
+
+ AllTests.allTests(this);
+ }
}
finally
{
Dispatcher.terminate();
}
}
+
+ public static int Main(string[] args)
+ {
+ return Test.TestDriver.runTest<Collocated>(args);
+ }
}