예제 #1
0
        public static void Main(string[] args)
        {
            int status = ServerBootstrapper.Start(new CommunityBootstrapper(), args);

            if (status != 0)
            {
                Environment.Exit(status);
            }
        }
예제 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldStartStopNeoServerWithoutAnyConfigFiles() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldStartStopNeoServerWithoutAnyConfigFiles()
        {
            // When
            int resultCode = ServerBootstrapper.Start(Bootstrapper, WithConnectorsOnRandomPortsConfig("--home-dir", TempDir.newFolder("home-dir").AbsolutePath, "-c", ConfigOption(data_directory, TempDir.Root.AbsolutePath), "-c", ConfigOption(logs_directory, TempDir.Root.AbsolutePath), "-c", "dbms.backup.enabled=false"));

            // Then
            assertEquals(ServerBootstrapper.OK, resultCode);
            assertEventually("Server was not started", Bootstrapper.isRunning, @is(true), 1, TimeUnit.MINUTES);
        }
예제 #3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void testStartupWithConnectors(boolean httpEnabled, boolean httpsEnabled, boolean boltEnabled) throws Exception
        private void TestStartupWithConnectors(bool httpEnabled, bool httpsEnabled, bool boltEnabled)
        {
            int resultCode = ServerBootstrapper.Start(Bootstrapper, "--home-dir", TempDir.newFolder("home-dir").AbsolutePath, "-c", ConfigOption(data_directory, TempDir.Root.AbsolutePath), "-c", ConfigOption(logs_directory, TempDir.Root.AbsolutePath), "-c", "dbms.connector.http.enabled=" + httpEnabled, "-c", "dbms.connector.http.listen_address=:0", "-c", "dbms.connector.https.enabled=" + httpsEnabled, "-c", "dbms.connector.https.listen_address=:0", "-c", "dbms.connector.bolt.enabled=" + boltEnabled, "-c", "dbms.connector.bolt.listen_address=:0");

            assertEquals(ServerBootstrapper.OK, resultCode);
            assertEventually("Server was not started", Bootstrapper.isRunning, @is(true), 1, TimeUnit.MINUTES);
            AssertDbAccessibleAsEmbedded();

            verifyConnector(Db(), "http", httpEnabled);
            verifyConnector(Db(), "https", httpsEnabled);
            verifyConnector(Db(), "bolt", boltEnabled);
        }
예제 #4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void canOverrideConfigValues() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void CanOverrideConfigValues()
        {
            // Given
            File configFile = TempDir.newFile(Config.DEFAULT_CONFIG_FILE_NAME);

            IDictionary <string, string> properties = stringMap(forced_kernel_id.name(), "thisshouldnotshowup");

//JAVA TO C# CONVERTER TODO TASK: There is no .NET Dictionary equivalent to the Java 'putAll' method:
            properties.putAll(ServerTestUtils.DefaultRelativeProperties);
//JAVA TO C# CONVERTER TODO TASK: There is no .NET Dictionary equivalent to the Java 'putAll' method:
            properties.putAll(ConnectorsOnRandomPortsConfig());

            store(properties, configFile);

            // When
            ServerBootstrapper.Start(Bootstrapper, "--home-dir", TempDir.newFolder("home-dir").AbsolutePath, "--config-dir", configFile.ParentFile.AbsolutePath, "-c", ConfigOption(forced_kernel_id, "mycustomvalue"));

            // Then
            assertThat(Bootstrapper.Server.Config.get(forced_kernel_id), equalTo("mycustomvalue"));
        }
예제 #5
0
        /// <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 CommunityBootstrapper());
            Environment.Exit(ServerBootstrapper.Start(_bootstrapper, args));
        }
예제 #6
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void before()
        public virtual void Before()
        {
            Bootstrapper = NewBootstrapper();
        }