//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void debugLoggingEnabledBySetting() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void DebugLoggingEnabledBySetting() { // When File configFile = TempDir.newFile(Config.DEFAULT_CONFIG_FILE_NAME); IDictionary <string, string> properties = stringMap(store_internal_log_level.name(), "DEBUG"); //JAVA TO C# CONVERTER TODO TASK: There is no .NET Dictionary equivalent to the Java 'putAll' method: properties.putAll(ServerTestUtils.DefaultRelativeProperties); properties["dbms.connector.https.listen_address"] = "localhost:0"; properties["dbms.connector.1.type"] = "HTTP"; properties["dbms.connector.1.encryption"] = "NONE"; properties["dbms.connector.1.listen_address"] = "localhost:0"; properties["dbms.connector.1.enabled"] = "true"; properties[(new BoltConnector("BOLT")).listen_address.name()] = "localhost:0"; properties[OnlineBackupSettings.online_backup_server.name()] = "127.0.0.1:0"; store(properties, configFile); // When UncoveredEnterpriseBootstrapper uncoveredEnterpriseBootstrapper = new UncoveredEnterpriseBootstrapper(this); _cleanupRule.add(uncoveredEnterpriseBootstrapper); ServerBootstrapper.start(uncoveredEnterpriseBootstrapper, "--home-dir", TempDir.newFolder("home-dir").AbsolutePath, "--config-dir", configFile.ParentFile.AbsolutePath); // Then assertEventually("Server was started", uncoveredEnterpriseBootstrapper.isRunning, @is(true), 1, TimeUnit.MINUTES); LogProvider userLogProvider = uncoveredEnterpriseBootstrapper.UserLogProvider; assertTrue("Debug logging enabled by setting value.", userLogProvider.getLog(this.GetType()).DebugEnabled); }
static void Main(string[] args) { var builder = new ContainerBuilder(); var container = builder.Build(); var bootstrapper = new ServerBootstrapper(container); bootstrapper.RegisterRequestHandlerAssembly(typeof(AssemblyHook).Assembly); bootstrapper.RegisterRequestAndResponseTypes(typeof(Common.AssemblyHook).Assembly); Console.WriteLine("Async EndPoint - {0}", ASYNC_END_POINT); var asyncBaseAddress = new Uri(ASYNC_END_POINT); var asyncServiceHost = new ServiceHost(typeof(AsyncRouterService), asyncBaseAddress); Console.WriteLine("Sync EndPoint - {0}", SYNC_END_POINT); var syncBaseAddress = new Uri(SYNC_END_POINT); var syncServiceHost = new ServiceHost(typeof(SyncRouterService), syncBaseAddress); Console.WriteLine("Service starting..."); asyncServiceHost.Open(); syncServiceHost.Open(); Console.WriteLine("Service started..."); Console.ReadKey(false); asyncServiceHost.Close(); syncServiceHost.Close(); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldBeAbleToStartInSingleMode() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldBeAbleToStartInSingleMode() { // When int resultCode = ServerBootstrapper.start(Bootstrapper, "--home-dir", TempDir.newFolder("home-dir").AbsolutePath, "-c", ConfigOption(EnterpriseEditionSettings.mode, "SINGLE"), "-c", ConfigOption(GraphDatabaseSettings.data_directory, getRelativePath(_folder.Root, GraphDatabaseSettings.data_directory)), "-c", ConfigOption(logs_directory, TempDir.Root.AbsolutePath), "-c", ConfigOption(certificates_directory, getRelativePath(_folder.Root, certificates_directory)), "-c", (new BoltConnector("BOLT")).listen_address.name() + "=localhost:0", "-c", "dbms.connector.https.listen_address=localhost:0", "-c", "dbms.connector.1.type=HTTP", "-c", "dbms.connector.1.listen_address=localhost:0", "-c", "dbms.connector.1.encryption=NONE", "-c", "dbms.connector.1.enabled=true"); // Then assertEquals(ServerBootstrapper.OK, resultCode); assertEventually("Server was not started", Bootstrapper.isRunning, @is(true), 1, TimeUnit.MINUTES); }
/// <param name="args"> </param> public static void Main(string[] args) { int status = ServerBootstrapper.start(new EnterpriseBootstrapper(), args); if (status != 0) { Environment.Exit(status); } }
// @Test // TODO: Update this for causal clustering testing. //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void shouldBeAbleToStartInHAMode() throws Exception public virtual void ShouldBeAbleToStartInHAMode() { // When int clusterPort = PortAuthority.allocatePort(); int resultCode = ServerBootstrapper.start(Bootstrapper, "--home-dir", TempDir.newFolder("home-dir").AbsolutePath, "-c", ConfigOption(EnterpriseEditionSettings.mode, "CORE"), "-c", ConfigOption(ClusterSettings.server_id, "1"), "-c", ConfigOption(ClusterSettings.initial_hosts, "127.0.0.1:" + clusterPort), "-c", ConfigOption(ClusterSettings.cluster_server, "127.0.0.1:" + clusterPort), "-c", ConfigOption(GraphDatabaseSettings.data_directory, getRelativePath(_folder.Root, GraphDatabaseSettings.data_directory)), "-c", ConfigOption(logs_directory, TempDir.Root.AbsolutePath), "-c", ConfigOption(certificates_directory, getRelativePath(_folder.Root, certificates_directory)), "-c", (new BoltConnector("BOLT")).listen_address.name() + "=localhost:0", "-c", "dbms.connector.https.listen_address=localhost:0", "-c", "dbms.connector.1.type=HTTP", "-c", "dbms.connector.1.encryption=NONE", "-c", "dbms.connector.1.listen_address=localhost:0", "-c", "dbms.connector.1.enabled=true", "-c", "causal_clustering.initial_discovery_members=localhost:5000"); // Then assertEquals(ServerBootstrapper.OK, resultCode); assertEventually("Server was not started", Bootstrapper.isRunning, @is(true), 1, TimeUnit.MINUTES); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void serverDatabaseShouldStartOnOlderStoreWhenUpgradeIsEnabled() throws Throwable //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ServerDatabaseShouldStartOnOlderStoreWhenUpgradeIsEnabled() { File rootDir = TestDir.directory(); File databaseDirectory = Config.defaults(GraphDatabaseSettings.data_directory, rootDir.ToString()).get(GraphDatabaseSettings.database_path); Store.prepareDirectory(databaseDirectory); File configFile = new File(rootDir, Config.DEFAULT_CONFIG_FILE_NAME); Properties props = new Properties(); props.putAll(ServerTestUtils.DefaultRelativeProperties); props.setProperty(GraphDatabaseSettings.data_directory.name(), rootDir.AbsolutePath); props.setProperty(GraphDatabaseSettings.logs_directory.name(), rootDir.AbsolutePath); props.setProperty(GraphDatabaseSettings.allow_upgrade.name(), "true"); props.setProperty(GraphDatabaseSettings.pagecache_memory.name(), "8m"); props.setProperty((new HttpConnector("http")).type.name(), "HTTP"); props.setProperty((new HttpConnector("http")).enabled.name(), "true"); props.setProperty((new HttpConnector("http")).listen_address.name(), "localhost:0"); props.setProperty((new HttpConnector("https")).enabled.name(), Settings.FALSE); props.setProperty(OnlineBackupSettings.online_backup_enabled.name(), Settings.FALSE); props.setProperty((new BoltConnector("bolt")).enabled.name(), Settings.FALSE); using (StreamWriter writer = new StreamWriter(configFile)) { props.store(writer, ""); } ServerBootstrapper bootstrapper = new CommunityBootstrapper(); try { ServerBootstrapper.start(rootDir.AbsoluteFile, configFile, Collections.emptyMap()); assertTrue(bootstrapper.Running); CheckInstance(Store, bootstrapper.Server.Database.Graph); } finally { bootstrapper.Stop(); } assertConsistentStore(DatabaseLayout.of(databaseDirectory)); }
internal virtual IServerSupervisor GetBootstrapSupervisor() { var context = new ServerContext { Queues = _options.Queues, WorkerCount = _options.WorkerCount }; var bootstrapper = new ServerBootstrapper( _serverId, context, _storage, new Lazy <IServerSupervisor>(GetSupervisors)); return(new ServerSupervisor( bootstrapper, new ServerSupervisorOptions { ShutdownTimeout = _options.ShutdownTimeout })); }
public static IContainer SetupContainer(Action <ContainerBuilder> containerCallback) { var serverBootstrapper = new ServerBootstrapper(); return(serverBootstrapper.Setup(FreeconServerEnvironment.Test, containerCallback)); }
/// <summary> /// Used by the windows service wrapper /// </summary> //JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @SuppressWarnings("unused") public static void start(String[] args) public static void Start(string[] args) { _bootstrapper = new BlockingBootstrapper(new ArbiterBootstrapper()); Environment.Exit(ServerBootstrapper.start(_bootstrapper, args)); }
public App() { InitializeComponent(); serverBootstrapper = new ServerBootstrapper(); }