Package org.neo4j.graphdb

Examples of org.neo4j.graphdb.GraphDatabaseService.shutdown()


    @Test
    public void testEnableDefaultsInConfig() throws Exception
    {
        GraphDatabaseService db = newDb( "true" );
        OnlineBackup.from( "localhost" ).full( BACKUP_DIR );
        db.shutdown();
    }

    @Test
    public void testEnableCustomPortInConfig() throws Exception
    {
View Full Code Here


        catch ( Exception e )
        { // Good
        }
       
        OnlineBackup.from( "localhost", customPort ).full( BACKUP_DIR );
        db.shutdown();
    }
}
View Full Code Here

                {
                    verify( masterDb, slaveDb );
                }
                finally
                {
                    slaveDb.shutdown();
                }
            }
        }
        finally
        {
View Full Code Here

        Thread stopper = new Thread()
        {
            @Override public void run()
            {
                sleepNice( 1000 );
                graphDb.shutdown();
            }
        };
        final String[] keys = { "apoc", "zion", "neo" };
        try
        {
View Full Code Here

            sleepNice( 100 );
        }
       
        // Start up and let it recover
        final GraphDatabaseService newGraphDb = new EmbeddedGraphDatabase( getDbPath() );
        newGraphDb.shutdown();
    }
   
    private static void sleepNice( long time )
    {
        try
View Full Code Here

                  throw new IllegalStateException( node + " has property '" + key + "'='" +
                          value + "', but not in index" );
              }
          }
      }
      db.shutdown();
    }
   
    @Test
    public void testAsLittleAsPossibleRecoveryScenario() throws Exception
    {
View Full Code Here

        GraphDatabaseService db = newGraphDbService();
        Index<Node> index = db.index().forNodes( "my-index" );
        db.beginTx();
        Node node = db.createNode();
        index.add( node, "key", "value" );
        db.shutdown();
       
        // This doesn't seem to trigger recovery... it really should
        new EmbeddedGraphDatabase( getDbPath() ).shutdown();
    }
   
View Full Code Here

    @Test
    public void testIndexDeleteIssue() throws Exception
    {
        GraphDatabaseService db = newGraphDbService();
        db.index().forNodes( "index" );
        db.shutdown();
       
        assertEquals( 0, Runtime.getRuntime().exec( new String[] { "java", "-cp", System.getProperty( "java.class.path" ),
                AddDeleteQuit.class.getName(), getDbPath() } ).waitFor() );
       
        new EmbeddedGraphDatabase( getDbPath() ).shutdown();
View Full Code Here

       
        assertEquals( 0, Runtime.getRuntime().exec( new String[] { "java", "-cp", System.getProperty( "java.class.path" ),
                AddDeleteQuit.class.getName(), getDbPath() } ).waitFor() );
       
        new EmbeddedGraphDatabase( getDbPath() ).shutdown();
        db.shutdown();
    }

    @Test
    public void recoveryForRelationshipCommandsOnly() throws Exception
    {
View Full Code Here

        }
        finally
        {
            if ( db != null )
            {
                db.shutdown();
            }
        }
    }

    private void assertCanStart( String path )
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.