3939import java .lang .reflect .InvocationTargetException ;
4040import java .util .Map ;
4141
42+ import static org .junit .jupiter .api .Assertions .assertEquals ;
4243import static org .junit .jupiter .api .Assertions .fail ;
4344import static org .neo4j .graphalgo .config .GraphCreateFromCypherConfig .ALL_RELATIONSHIPS_UNDIRECTED_QUERY ;
4445import static org .neo4j .graphalgo .config .GraphCreateFromStoreConfig .RELATIONSHIP_PROJECTION_KEY ;
@@ -148,7 +149,14 @@ public String seedPropertyKeyOverride() {
148149 @ Test
149150 void warnOnNoneAggregatedGraph () {
150151 var graphName = "nonagg" ;
151- runQuery ("CALL gds.graph.create($graphName, '*', '*')" , Map .of ("graphName" , graphName ));
152+ runQuery ("CALL gds.graph.create(" +
153+ " $graphName," +
154+ " '*', {" +
155+ " ALL: {" +
156+ " type: '*'," +
157+ " orientation: 'UNDIRECTED'" +
158+ " }" +
159+ " })" , Map .of ("graphName" , graphName ));
152160
153161 CypherMapWrapper config = createMinimalConfig (CypherMapWrapper .empty ());
154162
@@ -160,18 +168,17 @@ void warnOnNoneAggregatedGraph() {
160168 .filter (procMethod -> !getProcedureMethodName (procMethod ).endsWith (".estimate" ))
161169 .forEach (noneEstimateMethod -> {
162170 try {
163- noneEstimateMethod .invoke (proc , "g " , config .toMap ());
171+ noneEstimateMethod .invoke (proc , "nonagg " , config .toMap ());
164172 } catch (IllegalAccessException | InvocationTargetException e ) {
165173 fail (e );
166174 }
167175 });
168176 });
169177
170- testLog .containsMessage (
171- "warn" ,
172- "Procedure runs optimal with relationship aggregation. " +
173- "Projection for `*` does not aggregate relationships. " +
174- "You might experience a slowdown in the procedure execution."
175- );
178+ String expected = "Procedure runs optimal with relationship aggregation. " +
179+ "Projection for `ALL` does not aggregate relationships. " +
180+ "You might experience a slowdown in the procedure execution." ;
181+ String actual = testLog .getMessages ("warn" ).get (0 );
182+ assertEquals (expected , actual );
176183 }
177184}
0 commit comments