private void crashAndRestart() throws Exception { fsRule.snapshot( db::shutdown ); db = newDb(); }
private void killDb() throws Exception { if ( db != null ) { fs.snapshot( () -> { db.shutdown(); db = null; } ); } }
private void killDb() throws Exception { if ( db != null ) { fs.snapshot( () -> { db.shutdown(); db = null; } ); } }
@SuppressWarnings( "deprecation" ) private void crashAndRestart() throws Exception { final GraphDatabaseService db1 = db; FileSystemAbstraction uncleanFs = fsRule.snapshot( db1::shutdown ); db = (GraphDatabaseAPI) databaseFactory( uncleanFs ).newImpermanentDatabase(); } }
private void crashAndRestart() throws Exception { final GraphDatabaseService db1 = db; FileSystemAbstraction uncleanFs = fsRule.snapshot( db1::shutdown ); db = databaseFactory( uncleanFs ).newImpermanentDatabase(); }
@Test public void testStartEntryWrittenOnceOnRollback() throws Exception { File storeDir = testDirectory.databaseDir(); final GraphDatabaseService db = new TestGraphDatabaseFactory().setFileSystem( fs.get() ).newImpermanentDatabase( storeDir ); createSomeTransactions( db ); EphemeralFileSystemAbstraction snapshot = fs.snapshot( db::shutdown ); new TestGraphDatabaseFactory().setFileSystem( snapshot ).newImpermanentDatabase( storeDir ).shutdown(); }
private void createGraphDbAndKillIt( Config config ) throws Exception { final GraphDatabaseService db = new TestGraphDatabaseFactory() .setFileSystem( fs.get() ) .newImpermanentDatabaseBuilder( testDirectory.databaseDir() ) .setConfig( config.getRaw() ) .newGraphDatabase(); try ( Transaction tx = db.beginTx() ) { db.createNode( label( "FOO" ) ); db.createNode( label( "BAR" ) ); tx.success(); } fs.snapshot( db::shutdown ); }
EphemeralFileSystemAbstraction snapshot = fs.snapshot( db::shutdown );
fs.snapshot( throwing( () ->