Skip to content

Commit

Permalink
First step to fix the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gartens committed Jul 12, 2023
1 parent c04baee commit 82e00a2
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/org/polypheny/db/adapter/Adapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ public Adapter( int adapterId, String uniqueName, Map<String, String> settings )
this.adapterName = properties.name();
// Make sure the settings are actually valid
this.validateSettings( settings, true );
this.settings = settings;
this.settings = new HashMap<>( settings );

informationPage = new InformationPage( uniqueName );
informationGroups = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,13 @@ static PolyphenyKeypair generateOrLoadClientKeypair( String hostname ) throws IO
return PolyphenyCertificateUtils.generateOrLoadCertificates( clientCertificatePath, clientKeyPath, RuntimeConfig.INSTANCE_UUID.getString() );
}


public static void deleteCertificates( String hostname ) {
try {
PolyphenyHomeDirManager.getInstance().recursiveDeleteFolder( getBaseDirectory( hostname ) );
} catch ( IOException e ) {
// ignore
}
}

}
1 change: 1 addition & 0 deletions dbms/src/main/java/org/polypheny/db/PolyphenyDb.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import java.nio.file.Path;
import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;
import javax.inject.Inject;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ public CassandraPlugin( PluginWrapper wrapper ) {
public void start() {
Map<String, String> settings = ImmutableMap.of(
"mode", "docker",
"instanceId", "0",
"port", "9042"
"instanceId", "0"
);

Adapter.addAdapter( CassandraStore.class, ADAPTER_NAME, settings );
Expand Down Expand Up @@ -147,8 +146,8 @@ public static class CassandraStore extends DataStore {
private final List<PolyType> unsupportedTypes = ImmutableList.of( PolyType.ARRAY, PolyType.MAP );


public CassandraStore( int storeId, String uniqueName, Map<String, String> settings ) {
super( storeId, uniqueName, settings, true );
public CassandraStore( int storeId, String uniqueName, Map<String, String> adapterSettings ) {
super( storeId, uniqueName, adapterSettings, true );

// Parse settings

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ public void start() {
Map<String, String> settings = ImmutableMap.of(
"mode", "docker",
"instanceId", "0",
"password", "polypheny",
"maxConnections", "25",
"port", "5000"
"maxConnections", "25"
);

Adapter.addAdapter( MonetdbStore.class, ADAPTER_NAME, settings );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,13 @@ public MongoPlugin( PluginWrapper wrapper ) {

@Override
public void start() {
Map<String, String> settings = ImmutableMap.copyOf( Map.of(
Map<String, String> settings = ImmutableMap.of(
"persistent", "true",
"port", "27017",
"type", "mongo",
"instanceId", "0",
"mode", "docker",
"trxLifetimeLimit", "1209600"
) );
);

Adapter.addAdapter( MongoStore.class, ADAPTER_NAME, settings );
}
Expand Down Expand Up @@ -152,8 +151,8 @@ public List<NamespaceType> getSupportedSchemaType() {
}


public MongoStore( int adapterId, String uniqueName, Map<String, String> settings ) {
super( adapterId, uniqueName, settings, Boolean.parseBoolean( settings.get( "persistent" ) ) );
public MongoStore( int adapterId, String uniqueName, Map<String, String> adapterSettings ) {
super( adapterId, uniqueName, adapterSettings, Boolean.parseBoolean( adapterSettings.get( "persistent" ) ) );

if ( deployMode == DeployMode.DOCKER ) {
if ( settings.getOrDefault( "deploymentId", "" ).equals( "" ) ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ public Neo4jPlugin( PluginWrapper wrapper ) {
public void start() {
ImmutableMap<String, String> settings = ImmutableMap.of(
"persistent", "true",
"port", "7687",
"mode", "docker",
"instanceId", "0",
"type", "neo4j" );
Expand Down Expand Up @@ -167,8 +166,8 @@ public static class Neo4jStore extends DataStore {
private String host;


public Neo4jStore( int adapterId, String uniqueName, Map<String, String> settings ) {
super( adapterId, uniqueName, settings, Boolean.parseBoolean( settings.get( "persistent" ) ) );
public Neo4jStore( int adapterId, String uniqueName, Map<String, String> adapterSettings ) {
super( adapterId, uniqueName, adapterSettings, Boolean.parseBoolean( adapterSettings.get( "persistent" ) ) );

this.port = Integer.parseInt( settings.get( "port" ) );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ public PostgresqlPlugin( PluginWrapper wrapper ) {
public void start() {
Map<String, String> settings = ImmutableMap.of(
"mode", "docker",
"password", "polypheny",
"instanceId", "0",
"port", "3306",
"maxConnections", "25"
);

Expand Down

0 comments on commit 82e00a2

Please sign in to comment.