Skip to content

Commit 12aac7b

Browse files
committed
Remove dependency on private project
The decision on using Cypher or Native projection can be done with a simple boolean
1 parent c2ceb97 commit 12aac7b

File tree

4 files changed

+12
-20
lines changed

4 files changed

+12
-20
lines changed

proc/community/src/test/java/org/neo4j/gds/triangle/LocalClusteringCoefficientBaseProcTest.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import org.neo4j.gds.BaseProcTest;
2727
import org.neo4j.gds.ConfigurableSeedConfigTest;
2828
import org.neo4j.gds.GdsCypher;
29-
import org.neo4j.gds.GraphFactoryTestSupport;
3029
import org.neo4j.gds.MemoryEstimateTest;
3130
import org.neo4j.gds.OnlyUndirectedTest;
3231
import org.neo4j.gds.Orientation;
@@ -186,11 +185,8 @@ public void loadGraph(String graphName){
186185
}
187186

188187
@Override
189-
public void testRunMultipleTimesOnLoadedGraph(GraphFactoryTestSupport.FactoryType factoryType) {
190-
if (factoryType == GraphFactoryTestSupport.FactoryType.CYPHER) {
191-
// LCC only works on UNDIRECTED, and Cypher only projects directed
192-
return;
193-
}
194-
OnlyUndirectedTest.super.testRunMultipleTimesOnLoadedGraph(factoryType);
188+
public void testRunMultipleTimesOnLoadedGraph(boolean cypherProjection) {
189+
// LCC only works on UNDIRECTED, and Cypher only projects directed
190+
OnlyUndirectedTest.super.testRunMultipleTimesOnLoadedGraph(false);
195191
}
196192
}

proc/community/src/test/java/org/neo4j/gds/triangle/TriangleCountBaseProcTest.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import org.junit.jupiter.api.Test;
2424
import org.neo4j.gds.AlgoBaseProcTest;
2525
import org.neo4j.gds.BaseProcTest;
26-
import org.neo4j.gds.GraphFactoryTestSupport;
2726
import org.neo4j.gds.MemoryEstimateTest;
2827
import org.neo4j.gds.OnlyUndirectedTest;
2928
import org.neo4j.gds.Orientation;
@@ -109,11 +108,8 @@ public void loadGraph(String graphName){
109108
}
110109

111110
@Override
112-
public void testRunMultipleTimesOnLoadedGraph(GraphFactoryTestSupport.FactoryType factoryType) {
113-
if (factoryType == GraphFactoryTestSupport.FactoryType.CYPHER) {
114-
// TC only works on UNDIRECTED, and Cypher only projects directed
115-
return;
116-
}
117-
OnlyUndirectedTest.super.testRunMultipleTimesOnLoadedGraph(factoryType);
111+
public void testRunMultipleTimesOnLoadedGraph(boolean cypherProjection) {
112+
// TC only works on UNDIRECTED, and Cypher only projects directed
113+
OnlyUndirectedTest.super.testRunMultipleTimesOnLoadedGraph(false);
118114
}
119115
}

proc/test/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ dependencies {
2929
api project(':proc-catalog')
3030
api project(':proc-common')
3131
api project(':test-utils')
32-
api project(':test-graph-loaders')
3332
}
3433

3534
afterEvaluate {

proc/test/src/main/java/org/neo4j/gds/AlgoBaseProcTest.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
import org.jetbrains.annotations.NotNull;
2323
import org.junit.jupiter.api.AfterEach;
2424
import org.junit.jupiter.api.Test;
25-
import org.neo4j.gds.GraphFactoryTestSupport.AllGraphStoreFactoryTypesTest;
25+
import org.junit.jupiter.params.ParameterizedTest;
26+
import org.junit.jupiter.params.provider.ValueSource;
2627
import org.neo4j.gds.api.DatabaseId;
2728
import org.neo4j.gds.api.DefaultValue;
2829
import org.neo4j.gds.api.GraphStore;
@@ -65,7 +66,6 @@
6566
import static org.junit.jupiter.api.Assertions.assertThrows;
6667
import static org.junit.jupiter.api.Assertions.assertTrue;
6768
import static org.junit.jupiter.api.Assertions.fail;
68-
import static org.neo4j.gds.GraphFactoryTestSupport.FactoryType.CYPHER;
6969
import static org.neo4j.gds.QueryRunner.runQuery;
7070
import static org.neo4j.gds.config.GraphProjectFromStoreConfig.NODE_PROPERTIES_KEY;
7171
import static org.neo4j.gds.config.GraphProjectFromStoreConfig.RELATIONSHIP_PROPERTIES_KEY;
@@ -279,10 +279,11 @@ default boolean releaseAlgorithm() {
279279
return true;
280280
}
281281

282-
@AllGraphStoreFactoryTypesTest
283-
default void testRunMultipleTimesOnLoadedGraph(GraphFactoryTestSupport.FactoryType factoryType) {
282+
@ParameterizedTest
283+
@ValueSource(booleans = {true, false})
284+
default void testRunMultipleTimesOnLoadedGraph(boolean cypherProjection) {
284285
String loadedGraphName = "loadedGraph";
285-
GraphProjectConfig graphProjectConfig = factoryType == CYPHER
286+
GraphProjectConfig graphProjectConfig = cypherProjection
286287
? emptyWithNameCypher(TEST_USERNAME, loadedGraphName)
287288
: withNameAndRelationshipProjections(TEST_USERNAME, loadedGraphName, relationshipProjections());
288289

0 commit comments

Comments
 (0)