Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MishaDemianenko committed Apr 3, 2018
1 parent 52245c8 commit 68b25f5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
Expand Up @@ -232,7 +232,7 @@ private class EagerQueryResult implements QueryResult

EagerQueryResult()
{
fields = originalResult.columns().toArray( new String[originalResult.columns().size()] );
fields = originalResult.columns().toArray( new String[0] );
}

@Override
Expand Down
Expand Up @@ -74,28 +74,22 @@ public void tearDown()
@Test
public void executeQueryWithSnapshotEngine()
{
db = new EnterpriseGraphDatabaseFactory()
.newEmbeddedDatabaseBuilder( testDirectory.directory("withSnapshotEngine") )
.setConfig( new BoltConnector( "bolt" ).type, "BOLT" )
.setConfig( new BoltConnector( "bolt" ).enabled, "true" )
.setConfig( new BoltConnector( "bolt" ).listen_address, "localhost:0" )
.setConfig( GraphDatabaseSettings.snapshot_query, Settings.TRUE )
.newGraphDatabase();
initDatabase();
connectDirver();
verifyQueryExecution();
executeQuery( "withSnapshotEngine", Settings.TRUE );
}

@Test
public void executeQueryWithoutSnapshotEngine()
{
db = new EnterpriseGraphDatabaseFactory()
.newEmbeddedDatabaseBuilder( testDirectory.directory( "withoutSnapshotEngine" ) )
executeQuery( "withoutSnapshotEngine", Settings.FALSE );
}

private void executeQuery( String directory, String useSnapshotEngineSettingValue )
{
db = new EnterpriseGraphDatabaseFactory().newEmbeddedDatabaseBuilder( testDirectory.directory( directory ) )
.setConfig( new BoltConnector( "bolt" ).type, "BOLT" )
.setConfig( new BoltConnector( "bolt" ).enabled, "true" )
.setConfig( new BoltConnector( "bolt" ).listen_address, "localhost:0" )
.setConfig( GraphDatabaseSettings.snapshot_query, Settings.FALSE )
.newGraphDatabase();
.setConfig( GraphDatabaseSettings.snapshot_query, useSnapshotEngineSettingValue ).newGraphDatabase();
initDatabase();
connectDirver();
verifyQueryExecution();
Expand Down

0 comments on commit 68b25f5

Please sign in to comment.