Skip to content

Commit

Permalink
fixing port clashes
Browse files Browse the repository at this point in the history
  • Loading branch information
lassewesth committed Sep 4, 2017
1 parent de91cd7 commit fb84133
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 12 deletions.
Expand Up @@ -317,6 +317,7 @@ private void prepareDbWithDeletedRelationshipPartOfTheChain()
{ {
GraphDatabaseAPI db = (GraphDatabaseAPI) new TestGraphDatabaseFactory().newEmbeddedDatabaseBuilder( testDirectory.graphDbDir() ) GraphDatabaseAPI db = (GraphDatabaseAPI) new TestGraphDatabaseFactory().newEmbeddedDatabaseBuilder( testDirectory.graphDbDir() )
.setConfig( GraphDatabaseSettings.record_format, getRecordFormatName() ) .setConfig( GraphDatabaseSettings.record_format, getRecordFormatName() )
.setConfig( "dbms.backup.enabled", "false" )
.newGraphDatabase(); .newGraphDatabase();
try try
{ {
Expand Down Expand Up @@ -355,6 +356,7 @@ protected Map<String,String> settings( String... strings )
Map<String, String> defaults = new HashMap<>(); Map<String, String> defaults = new HashMap<>();
defaults.put( GraphDatabaseSettings.pagecache_memory.name(), "8m" ); defaults.put( GraphDatabaseSettings.pagecache_memory.name(), "8m" );
defaults.put( GraphDatabaseSettings.record_format.name(), getRecordFormatName() ); defaults.put( GraphDatabaseSettings.record_format.name(), getRecordFormatName() );
defaults.put( "dbms.backup.enabled", "false" );
return stringMap( defaults, strings ); return stringMap( defaults, strings );
} }


Expand Down
Expand Up @@ -162,9 +162,9 @@ private Config getTuningConfiguration()
private GraphDatabaseAPI getGraphDatabaseAPI() private GraphDatabaseAPI getGraphDatabaseAPI()
{ {
TestGraphDatabaseFactory factory = new TestGraphDatabaseFactory(); TestGraphDatabaseFactory factory = new TestGraphDatabaseFactory();
GraphDatabaseBuilder builder = factory.newEmbeddedDatabaseBuilder( directory.absolutePath() ); GraphDatabaseService database = factory.newEmbeddedDatabaseBuilder( directory.absolutePath() )
GraphDatabaseService database = builder
.setConfig( GraphDatabaseSettings.record_format, getRecordFormatName() ) .setConfig( GraphDatabaseSettings.record_format, getRecordFormatName() )
.setConfig( "dbms.backup.enabled", "false" )
.newGraphDatabase(); .newGraphDatabase();
return (GraphDatabaseAPI) database; return (GraphDatabaseAPI) database;
} }
Expand Down
Expand Up @@ -124,6 +124,7 @@ private StoreAccess createStoreWithOneHighDegreeNodeAndSeveralDegreeTwoNodes( in
GraphDatabaseService database = new TestGraphDatabaseFactory() GraphDatabaseService database = new TestGraphDatabaseFactory()
.newEmbeddedDatabaseBuilder( storeDirectory ) .newEmbeddedDatabaseBuilder( storeDirectory )
.setConfig( GraphDatabaseSettings.record_format, getRecordFormatName() ) .setConfig( GraphDatabaseSettings.record_format, getRecordFormatName() )
.setConfig( "dbms.backup.enabled", "false" )
.newGraphDatabase(); .newGraphDatabase();


try ( Transaction transaction = database.beginTx() ) try ( Transaction transaction = database.beginTx() )
Expand Down
Expand Up @@ -91,7 +91,9 @@ public static void setUp()
CustomClockFacadeFactory facadeFactory = new CustomClockFacadeFactory(); CustomClockFacadeFactory facadeFactory = new CustomClockFacadeFactory();
database = new CustomClockTestGraphDatabaseFactory( facadeFactory ) database = new CustomClockTestGraphDatabaseFactory( facadeFactory )
.newEmbeddedDatabaseBuilder( directory.graphDbDir() ) .newEmbeddedDatabaseBuilder( directory.graphDbDir() )
.setConfig( GraphDatabaseSettings.lock_acquisition_timeout, "2s" ).newGraphDatabase(); .setConfig( GraphDatabaseSettings.lock_acquisition_timeout, "2s" )
.setConfig( "dbms.backup.enabled", "false" )
.newGraphDatabase();


createTestNode( marker ); createTestNode( marker );
} }
Expand Down
Expand Up @@ -22,16 +22,17 @@
import org.neo4j.kernel.impl.store.format.RecordFormats; import org.neo4j.kernel.impl.store.format.RecordFormats;
import org.neo4j.kernel.impl.store.format.highlimit.HighLimit; import org.neo4j.kernel.impl.store.format.highlimit.HighLimit;
import org.neo4j.unsafe.impl.batchimport.ParallelBatchImporter; import org.neo4j.unsafe.impl.batchimport.ParallelBatchImporter;
import org.neo4j.unsafe.impl.batchimport.ParallelBatchImporterTest;
import org.neo4j.unsafe.impl.batchimport.cache.idmapping.IdGenerator; import org.neo4j.unsafe.impl.batchimport.cache.idmapping.IdGenerator;
import org.neo4j.unsafe.impl.batchimport.cache.idmapping.IdMapper; import org.neo4j.unsafe.impl.batchimport.cache.idmapping.IdMapper;


/** /**
* Test for {@link ParallelBatchImporter} in an enterprise environment so that enterprise store is used. * Test for {@link ParallelBatchImporter} in an enterprise environment so that enterprise store is used.
*/ */
public class ParallelBatchImporterIT extends org.neo4j.unsafe.impl.batchimport.ParallelBatchImporterTest public class HighLimitParallelBatchImporterIT extends ParallelBatchImporterTest
{ {
public ParallelBatchImporterIT( InputIdGenerator inputIdGenerator, IdMapper idMapper, IdGenerator idGenerator, public HighLimitParallelBatchImporterIT( InputIdGenerator inputIdGenerator, IdMapper idMapper, IdGenerator idGenerator,
boolean multiPassIterators ) boolean multiPassIterators )
{ {
super( inputIdGenerator, idMapper, idGenerator, multiPassIterators ); super( inputIdGenerator, idMapper, idGenerator, multiPassIterators );
} }
Expand Down
Expand Up @@ -26,13 +26,15 @@
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;


import org.neo4j.backup.OnlineBackupSettings;
import org.neo4j.consistency.ConsistencyCheckService; import org.neo4j.consistency.ConsistencyCheckService;
import org.neo4j.consistency.ConsistencyCheckTool; import org.neo4j.consistency.ConsistencyCheckTool;
import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Label; import org.neo4j.graphdb.Label;
import org.neo4j.graphdb.Node; import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.Transaction; import org.neo4j.graphdb.Transaction;
import org.neo4j.graphdb.factory.EnterpriseGraphDatabaseFactory; import org.neo4j.graphdb.factory.EnterpriseGraphDatabaseFactory;
import org.neo4j.kernel.configuration.Settings;
import org.neo4j.test.rule.SuppressOutput; import org.neo4j.test.rule.SuppressOutput;
import org.neo4j.test.rule.TestDirectory; import org.neo4j.test.rule.TestDirectory;


Expand All @@ -51,7 +53,10 @@ public class CompositeConstraintIT
public void compositeNodeKeyConstraintUpdate() throws Exception public void compositeNodeKeyConstraintUpdate() throws Exception
{ {
File storeDir = testDirectory.graphDbDir(); File storeDir = testDirectory.graphDbDir();
GraphDatabaseService database = new EnterpriseGraphDatabaseFactory().newEmbeddedDatabase( storeDir ); GraphDatabaseService database = new EnterpriseGraphDatabaseFactory()
.newEmbeddedDatabaseBuilder( storeDir )
.setConfig( OnlineBackupSettings.online_backup_enabled, Settings.FALSE )
.newGraphDatabase();


Label label = Label.label( "label" ); Label label = Label.label( "label" );


Expand Down
Expand Up @@ -33,6 +33,7 @@
import java.util.List; import java.util.List;
import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.ThreadLocalRandom;


import org.neo4j.backup.OnlineBackupSettings;
import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Label; import org.neo4j.graphdb.Label;
import org.neo4j.graphdb.Node; import org.neo4j.graphdb.Node;
Expand All @@ -41,10 +42,12 @@
import org.neo4j.graphdb.factory.GraphDatabaseSettings; import org.neo4j.graphdb.factory.GraphDatabaseSettings;
import org.neo4j.helpers.progress.ProgressMonitorFactory; import org.neo4j.helpers.progress.ProgressMonitorFactory;
import org.neo4j.kernel.configuration.Config; import org.neo4j.kernel.configuration.Config;
import org.neo4j.kernel.configuration.Settings;
import org.neo4j.kernel.impl.store.format.highlimit.HighLimit; import org.neo4j.kernel.impl.store.format.highlimit.HighLimit;
import org.neo4j.kernel.impl.store.format.standard.Standard; import org.neo4j.kernel.impl.store.format.standard.Standard;
import org.neo4j.kernel.internal.GraphDatabaseAPI; import org.neo4j.kernel.internal.GraphDatabaseAPI;
import org.neo4j.logging.FormattedLogProvider; import org.neo4j.logging.FormattedLogProvider;
import org.neo4j.test.rule.DatabaseRule;
import org.neo4j.test.rule.EmbeddedDatabaseRule; import org.neo4j.test.rule.EmbeddedDatabaseRule;
import org.neo4j.test.rule.SuppressOutput; import org.neo4j.test.rule.SuppressOutput;


Expand All @@ -53,7 +56,9 @@
@RunWith( Parameterized.class ) @RunWith( Parameterized.class )
public class ConsistencyCheckServiceRecordFormatIT public class ConsistencyCheckServiceRecordFormatIT
{ {
private final EmbeddedDatabaseRule db = new EmbeddedDatabaseRule().startLazily(); private final DatabaseRule db = new EmbeddedDatabaseRule()
.withSetting( OnlineBackupSettings.online_backup_enabled, Settings.FALSE )
.startLazily();


@Rule @Rule
public final RuleChain ruleChain = RuleChain.outerRule( SuppressOutput.suppressAll() ).around( db ); public final RuleChain ruleChain = RuleChain.outerRule( SuppressOutput.suppressAll() ).around( db );
Expand Down
Expand Up @@ -24,9 +24,11 @@


import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;


import org.neo4j.backup.OnlineBackupSettings;
import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Label; import org.neo4j.graphdb.Label;
import org.neo4j.graphdb.Transaction; import org.neo4j.graphdb.Transaction;
import org.neo4j.kernel.configuration.Settings;
import org.neo4j.logging.AssertableLogProvider; import org.neo4j.logging.AssertableLogProvider;
import org.neo4j.logging.LogProvider; import org.neo4j.logging.LogProvider;
import org.neo4j.test.TestEnterpriseGraphDatabaseFactory; import org.neo4j.test.TestEnterpriseGraphDatabaseFactory;
Expand Down Expand Up @@ -67,7 +69,9 @@ private GraphDatabaseService getDatabase( LogProvider logProvider )
{ {
return new TestEnterpriseGraphDatabaseFactory() return new TestEnterpriseGraphDatabaseFactory()
.setInternalLogProvider( logProvider ) .setInternalLogProvider( logProvider )
.newEmbeddedDatabase( testDirectory.graphDbDir() ); .newEmbeddedDatabaseBuilder( testDirectory.graphDbDir() )
.setConfig( OnlineBackupSettings.online_backup_enabled, Settings.FALSE )
.newGraphDatabase();
} }


private void waitIndexes( GraphDatabaseService db ) private void waitIndexes( GraphDatabaseService db )
Expand Down
Expand Up @@ -35,12 +35,14 @@
import java.util.concurrent.Future; import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;


import org.neo4j.backup.OnlineBackupSettings;
import org.neo4j.graphdb.Label; import org.neo4j.graphdb.Label;
import org.neo4j.graphdb.Node; import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.RelationshipType; import org.neo4j.graphdb.RelationshipType;
import org.neo4j.graphdb.Result; import org.neo4j.graphdb.Result;
import org.neo4j.graphdb.Transaction; import org.neo4j.graphdb.Transaction;
import org.neo4j.kernel.api.proc.ProcedureSignature; import org.neo4j.kernel.api.proc.ProcedureSignature;
import org.neo4j.kernel.configuration.Settings;
import org.neo4j.kernel.impl.proc.Procedures; import org.neo4j.kernel.impl.proc.Procedures;
import org.neo4j.test.rule.DatabaseRule; import org.neo4j.test.rule.DatabaseRule;
import org.neo4j.test.rule.EnterpriseDatabaseRule; import org.neo4j.test.rule.EnterpriseDatabaseRule;
Expand All @@ -51,7 +53,8 @@
public class ProcedureResourcesIT public class ProcedureResourcesIT
{ {
@Rule @Rule
public DatabaseRule db = new EnterpriseDatabaseRule(); public DatabaseRule db = new EnterpriseDatabaseRule()
.withSetting( OnlineBackupSettings.online_backup_enabled, Settings.FALSE );


private final String indexDefinition = ":Label(prop)"; private final String indexDefinition = ":Label(prop)";
private final String legacyIndexName = "legacyIndex"; private final String legacyIndexName = "legacyIndex";
Expand Down
Expand Up @@ -32,6 +32,7 @@
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;


import org.neo4j.backup.OnlineBackupSettings;
import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Label; import org.neo4j.graphdb.Label;
import org.neo4j.graphdb.Node; import org.neo4j.graphdb.Node;
Expand All @@ -40,6 +41,7 @@
import org.neo4j.graphdb.factory.EnterpriseGraphDatabaseFactory; import org.neo4j.graphdb.factory.EnterpriseGraphDatabaseFactory;
import org.neo4j.graphdb.factory.GraphDatabaseSettings; import org.neo4j.graphdb.factory.GraphDatabaseSettings;
import org.neo4j.helpers.collection.Iterables; import org.neo4j.helpers.collection.Iterables;
import org.neo4j.kernel.configuration.Settings;
import org.neo4j.kernel.impl.MyRelTypes; import org.neo4j.kernel.impl.MyRelTypes;
import org.neo4j.kernel.impl.store.format.highlimit.HighLimit; import org.neo4j.kernel.impl.store.format.highlimit.HighLimit;
import org.neo4j.kernel.impl.store.format.standard.Standard; import org.neo4j.kernel.impl.store.format.standard.Standard;
Expand Down Expand Up @@ -100,7 +102,11 @@ public void shouldInsertDifferentTypesOfThings() throws Exception
} }


// THEN // THEN
GraphDatabaseService db = new EnterpriseGraphDatabaseFactory().newEmbeddedDatabase( directory.directory() ); GraphDatabaseService db = new EnterpriseGraphDatabaseFactory()
.newEmbeddedDatabaseBuilder( directory.directory() )
.setConfig( OnlineBackupSettings.online_backup_enabled, Settings.FALSE )
.newGraphDatabase();

try ( Transaction tx = db.beginTx() ) try ( Transaction tx = db.beginTx() )
{ {
Node node1 = db.getNodeById( node1Id ); Node node1 = db.getNodeById( node1Id );
Expand Down Expand Up @@ -191,6 +197,7 @@ private GraphDatabaseService newDb( File storeDir, String recordFormat )
{ {
return new EnterpriseGraphDatabaseFactory().newEmbeddedDatabaseBuilder( storeDir ) return new EnterpriseGraphDatabaseFactory().newEmbeddedDatabaseBuilder( storeDir )
.setConfig( GraphDatabaseSettings.record_format, recordFormat ) .setConfig( GraphDatabaseSettings.record_format, recordFormat )
.setConfig( OnlineBackupSettings.online_backup_enabled, Settings.FALSE )
.newGraphDatabase(); .newGraphDatabase();
} }


Expand Down
Expand Up @@ -26,6 +26,7 @@
import java.io.IOException; import java.io.IOException;
import java.util.function.Consumer; import java.util.function.Consumer;


import org.neo4j.backup.OnlineBackupSettings;
import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Label; import org.neo4j.graphdb.Label;
import org.neo4j.graphdb.Node; import org.neo4j.graphdb.Node;
Expand Down Expand Up @@ -137,6 +138,7 @@ private GraphDatabaseService startDb( String recordFormatName )
return new TestGraphDatabaseFactory().newEmbeddedDatabaseBuilder( testDirectory.graphDbDir() ) return new TestGraphDatabaseFactory().newEmbeddedDatabaseBuilder( testDirectory.graphDbDir() )
.setConfig( GraphDatabaseSettings.allow_upgrade, Settings.TRUE ) .setConfig( GraphDatabaseSettings.allow_upgrade, Settings.TRUE )
.setConfig( GraphDatabaseSettings.record_format, recordFormatName ) .setConfig( GraphDatabaseSettings.record_format, recordFormatName )
.setConfig( OnlineBackupSettings.online_backup_enabled, Settings.FALSE )
.newGraphDatabase(); .newGraphDatabase();
} }


Expand Down
Expand Up @@ -23,7 +23,9 @@
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;


import org.neo4j.backup.OnlineBackupSettings;
import org.neo4j.harness.extensionpackage.MyEnterpriseUnmanagedExtension; import org.neo4j.harness.extensionpackage.MyEnterpriseUnmanagedExtension;
import org.neo4j.kernel.configuration.Settings;
import org.neo4j.kernel.configuration.ssl.LegacySslPolicyConfig; import org.neo4j.kernel.configuration.ssl.LegacySslPolicyConfig;
import org.neo4j.test.rule.SuppressOutput; import org.neo4j.test.rule.SuppressOutput;
import org.neo4j.test.server.HTTP; import org.neo4j.test.server.HTTP;
Expand All @@ -39,7 +41,8 @@ public class EnterpriseNeo4jRuleTest
public Neo4jRule neo4j = new EnterpriseNeo4jRule() public Neo4jRule neo4j = new EnterpriseNeo4jRule()
.withConfig( LegacySslPolicyConfig.certificates_directory.name(), .withConfig( LegacySslPolicyConfig.certificates_directory.name(),
getRelativePath( getSharedTestTemporaryFolder(), LegacySslPolicyConfig.certificates_directory ) ) getRelativePath( getSharedTestTemporaryFolder(), LegacySslPolicyConfig.certificates_directory ) )
.withExtension( "/test", MyEnterpriseUnmanagedExtension.class ); .withExtension( "/test", MyEnterpriseUnmanagedExtension.class )
.withConfig( OnlineBackupSettings.online_backup_enabled, Settings.FALSE );


@Rule @Rule
public SuppressOutput suppressOutput = SuppressOutput.suppressAll(); public SuppressOutput suppressOutput = SuppressOutput.suppressAll();
Expand Down

0 comments on commit fb84133

Please sign in to comment.