public override void run(string[] args) { Ice.Properties properties = createTestProperties(ref args); // // For this test, we want to disable retries. // properties.setProperty("Ice.RetryIntervals", "-1"); // // This test kills connections, so we don't want warnings. // properties.setProperty("Ice.Warn.Connections", "0"); // This test relies on filling the TCP send/recv buffer, so // we rely on a fixed value for these buffers. properties.setProperty("Ice.TCP.SndSize", "50000"); // // Setup the test transport plug-in. // properties.setProperty("Ice.Default.Protocol", "test-" + properties.getPropertyWithDefault("Ice.Default.Protocol", "tcp")); using (var communicator = initialize(properties)) { PluginI plugin = new PluginI(communicator); plugin.initialize(); communicator.getPluginManager().addPlugin("Test", plugin); Test.BackgroundPrx background = AllTests.allTests(this); background.shutdown(); } }
public static int Main(string[] args) { int status = 0; Ice.Communicator communicator = null; try { Ice.InitializationData initData = new Ice.InitializationData(); initData.properties = Ice.Util.createProperties(ref args); // // For this test, we want to disable retries. // initData.properties.setProperty("Ice.RetryIntervals", "-1"); // // This test kills connections, so we don't want warnings. // initData.properties.setProperty("Ice.Warn.Connections", "0"); initData.properties.setProperty("Ice.MessageSizeMax", "50000"); // This test relies on filling the TCP send/recv buffer, so // we rely on a fixed value for these buffers. initData.properties.setProperty("Ice.TCP.SndSize", "50000"); // // Setup the test transport plug-in. // string defaultProtocol = initData.properties.getPropertyWithDefault("Ice.Default.Protocol", "tcp"); initData.properties.setProperty("Ice.Default.Protocol", "test-" + defaultProtocol); communicator = Ice.Util.initialize(ref args, initData); PluginI plugin = new PluginI(communicator); plugin.initialize(); communicator.getPluginManager().addPlugin("Test", plugin); status = run(args, communicator); } catch(System.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; }
public override void run(string[] args) { var properties = createTestProperties(ref args); // // This test kills connections, so we don't want warnings. // properties.setProperty("Ice.Warn.Connections", "0"); properties.setProperty("Ice.MessageSizeMax", "50000"); // This test relies on filling the TCP send/recv buffer, so // we rely on a fixed value for these buffers. properties.setProperty("Ice.TCP.RcvSize", "50000"); // // Setup the test transport plug-in. // properties.setProperty("Ice.Default.Protocol", "test-" + properties.getPropertyWithDefault("Ice.Default.Protocol", "tcp")); using (var communicator = initialize(properties)) { PluginI plugin = new PluginI(communicator); plugin.initialize(); communicator.getPluginManager().addPlugin("Test", plugin); // // When running as a MIDlet the properties for the server may be // overridden by configuration. If it isn't then we assume // defaults. // if (communicator.getProperties().getProperty("TestAdapter.Endpoints").Length == 0) { communicator.getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0)); } if (communicator.getProperties().getProperty("ControllerAdapter.Endpoints").Length == 0) { communicator.getProperties().setProperty("ControllerAdapter.Endpoints", getTestEndpoint(1, "tcp")); communicator.getProperties().setProperty("ControllerAdapter.ThreadPool.Size", "1"); } Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter"); Ice.ObjectAdapter adapter2 = communicator.createObjectAdapter("ControllerAdapter"); BackgroundControllerI backgroundController = new BackgroundControllerI(adapter); adapter.add(new BackgroundI(backgroundController), Ice.Util.stringToIdentity("background")); adapter.add(new LocatorI(backgroundController), Ice.Util.stringToIdentity("locator")); adapter.add(new RouterI(backgroundController), Ice.Util.stringToIdentity("router")); adapter.activate(); adapter2.add(backgroundController, Ice.Util.stringToIdentity("backgroundController")); adapter2.activate(); communicator.waitForShutdown(); } }
public static int Main(string[] args) { int status = 0; Ice.Communicator communicator = null; #if !COMPACT Debug.Listeners.Add(new ConsoleTraceListener()); #endif try { Ice.InitializationData initData = new Ice.InitializationData(); initData.properties = Ice.Util.createProperties(ref args); // // For this test, we want to disable retries. // initData.properties.setProperty("Ice.RetryIntervals", "-1"); // // This test kills connections, so we don't want warnings. // initData.properties.setProperty("Ice.Warn.Connections", "0"); // // Setup the test transport plug-in. // string defaultProtocol = initData.properties.getPropertyWithDefault("Ice.Default.Protocol", "tcp"); initData.properties.setProperty("Ice.Default.Protocol", "test-" + defaultProtocol); communicator = Ice.Util.initialize(ref args, initData); PluginI plugin = new PluginI(communicator); plugin.initialize(); communicator.getPluginManager().addPlugin("Test", plugin); status = run(args, communicator); } catch(System.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; }
public static int Main(string[] args) { int status = 0; Ice.Communicator communicator = null; try { Ice.InitializationData initData = new Ice.InitializationData(); initData.properties = Ice.Util.createProperties(ref args); // // For this test, we want to disable retries. // initData.properties.setProperty("Ice.RetryIntervals", "-1"); // // This test kills connections, so we don't want warnings. // initData.properties.setProperty("Ice.Warn.Connections", "0"); initData.properties.setProperty("Ice.MessageSizeMax", "50000"); // // Setup the test transport plug-in. // string defaultProtocol = initData.properties.getPropertyWithDefault("Ice.Default.Protocol", "tcp"); initData.properties.setProperty("Ice.Default.Protocol", "test-" + defaultProtocol); communicator = Ice.Util.initialize(ref args, initData); PluginI plugin = new PluginI(communicator); plugin.initialize(); communicator.getPluginManager().addPlugin("Test", plugin); status = run(args, communicator); } catch (System.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); }
public override int run(string[] args) { PluginI plugin = new PluginI(communicator()); plugin.initialize(); communicator().getPluginManager().addPlugin("Test", plugin); Test.BackgroundPrx background = AllTests.allTests(this); background.shutdown(); return(0); }
public override void run(string[] args) { var properties = createTestProperties(ref args); // // For this test, we want to disable retries. // properties["Ice.RetryIntervals"] = "-1"; // // This test kills connections, so we don't want warnings. // properties["Ice.Warn.Connections"] = "0"; // This test relies on filling the TCP send/recv buffer, so // we rely on a fixed value for these buffers. properties["Ice.TCP.SndSize"] = "50000"; // // Setup the test transport plug-in. // string?protocol; if (!properties.TryGetValue("Ice.Default.Protocol", out protocol)) { protocol = "tcp"; } properties["Ice.Default.Protocol"] = $"test-{protocol}"; using (var communicator = initialize(properties)) { PluginI plugin = new PluginI(communicator); plugin.initialize(); communicator.AddPlugin("Test", plugin); Test.BackgroundPrx background = AllTests.allTests(this); background.shutdown(); } }
public override int run(string[] args) { PluginI plugin = new PluginI(communicator()); plugin.initialize(); communicator().getPluginManager().addPlugin("Test", plugin); // // When running as a MIDlet the properties for the server may be // overridden by configuration. If it isn't then we assume // defaults. // if (communicator().getProperties().getProperty("TestAdapter.Endpoints").Length == 0) { communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0)); } if (communicator().getProperties().getProperty("ControllerAdapter.Endpoints").Length == 0) { communicator().getProperties().setProperty("ControllerAdapter.Endpoints", getTestEndpoint(1, "tcp")); communicator().getProperties().setProperty("ControllerAdapter.ThreadPool.Size", "1"); } Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter"); Ice.ObjectAdapter adapter2 = communicator().createObjectAdapter("ControllerAdapter"); BackgroundControllerI backgroundController = new BackgroundControllerI(adapter); adapter.add(new BackgroundI(backgroundController), Ice.Util.stringToIdentity("background")); adapter.add(new LocatorI(backgroundController), Ice.Util.stringToIdentity("locator")); adapter.add(new RouterI(backgroundController), Ice.Util.stringToIdentity("router")); adapter.activate(); adapter2.add(backgroundController, Ice.Util.stringToIdentity("backgroundController")); adapter2.activate(); communicator().waitForShutdown(); return(0); }
public override void run(string[] args) { var properties = createTestProperties(ref args); // // This test kills connections, so we don't want warnings. // properties["Ice.Warn.Connections"] = "0"; properties["Ice.MessageSizeMax"] = "50000"; // This test relies on filling the TCP send/recv buffer, so // we rely on a fixed value for these buffers. properties["Ice.TCP.RcvSize"] = "50000"; // // Setup the test transport plug-in. // string?protocol; if (!properties.TryGetValue("Ice.Default.Protocol", out protocol)) { protocol = "tcp"; } properties["Ice.Default.Protocol"] = $"test-{protocol}"; using (var communicator = initialize(properties)) { PluginI plugin = new PluginI(communicator); plugin.initialize(); communicator.AddPlugin("Test", plugin); // // When running as a MIDlet the properties for the server may be // overridden by configuration. If it isn't then we assume // defaults. // if (communicator.GetProperty("TestAdapter.Endpoints") == null) { communicator.SetProperty("TestAdapter.Endpoints", getTestEndpoint(0)); } if (communicator.GetProperty("ControllerAdapter.Endpoints") == null) { communicator.SetProperty("ControllerAdapter.Endpoints", getTestEndpoint(1, "tcp")); communicator.SetProperty("ControllerAdapter.ThreadPool.Size", "1"); } Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter"); Ice.ObjectAdapter adapter2 = communicator.createObjectAdapter("ControllerAdapter"); BackgroundControllerI backgroundController = new BackgroundControllerI(adapter); BackgroundI backgroundI = new BackgroundI(backgroundController); adapter.Add(backgroundI, "background"); LocatorI locatorI = new LocatorI(backgroundController); adapter.Add(locatorI, "locator"); RouterI routerI = new RouterI(backgroundController); adapter.Add(routerI, "router"); adapter.Activate(); adapter2.Add(backgroundController, "backgroundController"); adapter2.Activate(); communicator.waitForShutdown(); } }
public static int Main(string[] args) { int status = 0; Ice.Communicator communicator = null; try { Ice.InitializationData initData = new Ice.InitializationData(); initData.properties = Ice.Util.createProperties(ref args); // // This test kills connections, so we don't want warnings. // initData.properties.setProperty("Ice.Warn.Connections", "0"); initData.properties.setProperty("Ice.MessageSizeMax", "50000"); // // Setup the test transport plug-in. // string defaultProtocol = initData.properties.getPropertyWithDefault("Ice.Default.Protocol", "tcp"); initData.properties.setProperty("Ice.Default.Protocol", "test-" + defaultProtocol); communicator = Ice.Util.initialize(ref args, initData); PluginI plugin = new PluginI(communicator); plugin.initialize(); communicator.getPluginManager().addPlugin("Test", plugin); status = run(args, communicator, Console.Out); } catch(System.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; }