diff --git a/core-test-utils/src/main/java/org/neo4j/gds/assertj/Extractors.java b/core-test-utils/src/main/java/org/neo4j/gds/assertj/Extractors.java index dd8c9d6384e..267f31916b8 100644 --- a/core-test-utils/src/main/java/org/neo4j/gds/assertj/Extractors.java +++ b/core-test-utils/src/main/java/org/neo4j/gds/assertj/Extractors.java @@ -31,6 +31,17 @@ public final class Extractors { private Extractors() {} + public static ThrowingExtractor removingServerAddress() { + return Extractors::removingServerAddress; + } + + private static String removingServerAddress(String message) { + if (message.contains("localhost:")) { + return removingServerAddress(message.replaceFirst("localhost:\\d+", "
")); + } + return message; + } + public static ThrowingExtractor removingThreadId() { return Extractors::removeThreadId; } diff --git a/core/src/main/java/org/neo4j/gds/api/DatabaseInfo.java b/core/src/main/java/org/neo4j/gds/api/DatabaseInfo.java index 98aa1362d35..e184449baaf 100644 --- a/core/src/main/java/org/neo4j/gds/api/DatabaseInfo.java +++ b/core/src/main/java/org/neo4j/gds/api/DatabaseInfo.java @@ -31,6 +31,10 @@ static DatabaseInfo of(DatabaseId databaseId, DatabaseLocation databaseLocation) return ImmutableDatabaseInfo.of(databaseId, databaseLocation, Optional.empty()); } + static DatabaseInfo of(DatabaseId databaseId, DatabaseLocation databaseLocation, DatabaseId remoteDatabaseId) { + return ImmutableDatabaseInfo.of(databaseId, databaseLocation, remoteDatabaseId); + } + DatabaseId databaseId(); DatabaseLocation databaseLocation();