diff options
author | Benoit Foucher <benoit@zeroc.com> | 2016-11-25 13:13:22 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2016-11-25 13:13:22 +0100 |
commit | dcdc32af1fced49d80a8ccd93230e15d91ab45d8 (patch) | |
tree | eb69e2555fbd54496fce8a33f4dd610e1473ff51 /csharp/test/Ice/threadPoolPriority/Client.cs | |
parent | C# IceSSL/configuration log expired certificate exceptions. (diff) | |
download | ice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.tar.bz2 ice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.tar.xz ice-dcdc32af1fced49d80a8ccd93230e15d91ab45d8.zip |
Refactored test scripts
Diffstat (limited to 'csharp/test/Ice/threadPoolPriority/Client.cs')
-rw-r--r-- | csharp/test/Ice/threadPoolPriority/Client.cs | 44 |
1 files changed, 5 insertions, 39 deletions
diff --git a/csharp/test/Ice/threadPoolPriority/Client.cs b/csharp/test/Ice/threadPoolPriority/Client.cs index eb4f911ac78..f2c37ad7ecb 100644 --- a/csharp/test/Ice/threadPoolPriority/Client.cs +++ b/csharp/test/Ice/threadPoolPriority/Client.cs @@ -16,21 +16,13 @@ using System.Reflection; [assembly: AssemblyDescription("Ice test")] [assembly: AssemblyCompany("ZeroC, Inc.")] -public class Client +public class Client : TestCommon.Application { - private static void test(bool b) - { - if(!b) - { - throw new Exception(); - } - } - - private static int run(string[] args, Ice.Communicator communicator) + public override int run(string[] args) { Console.Out.Write("testing server priority... "); Console.Out.Flush(); - Ice.ObjectPrx obj = communicator.stringToProxy("test:default -p 12010 -t 10000"); + Ice.ObjectPrx obj = communicator().stringToProxy("test:" + getTestEndpoint(0) + " -t 10000"); Test.PriorityPrx priority = Test.PriorityPrxHelper.checkedCast(obj); try @@ -50,34 +42,8 @@ public class Client public static int Main(string[] args) { - int status = 0; - Ice.Communicator communicator = null; - - try - { - communicator = Ice.Util.initialize(ref args); - status = run(args, communicator); - } - catch(Exception ex) - { - Console.Error.WriteLine(ex); - status = 1; - } - - if(communicator != null) - { - try - { - communicator.destroy(); - } - catch(Ice.LocalException ex) - { - Console.Error.WriteLine(ex); - status = 1; - } - } - - return status; + Client app = new Client(); + return app.runmain(args); } } |