|
38 | 38 | import org.neo4j.gds.api.DatabaseId;
|
39 | 39 | import org.neo4j.gds.api.DefaultValue;
|
40 | 40 | import org.neo4j.gds.api.Graph;
|
| 41 | +import org.neo4j.gds.compat.GraphDatabaseApiProxy; |
41 | 42 | import org.neo4j.gds.config.ConcurrencyConfig;
|
42 | 43 | import org.neo4j.gds.core.Aggregation;
|
43 | 44 | import org.neo4j.gds.core.concurrency.DefaultPool;
|
44 | 45 | import org.neo4j.gds.core.concurrency.ParallelUtil;
|
45 | 46 | import org.neo4j.gds.core.loading.GraphStoreCatalog;
|
| 47 | +import org.neo4j.gds.core.utils.progress.TaskStore; |
46 | 48 | import org.neo4j.gds.test.TestProc;
|
47 | 49 | import org.neo4j.gds.utils.StringJoining;
|
48 | 50 |
|
@@ -1379,6 +1381,19 @@ void cypherCreationShouldNotReturnProjections() {
|
1379 | 1381 | });
|
1380 | 1382 | }
|
1381 | 1383 |
|
| 1384 | + @Test |
| 1385 | + void clearTasksOnFailure() { |
| 1386 | + runQuery("CREATE ({prop: \"stringProp\"}), ()"); |
| 1387 | + |
| 1388 | + assertThatThrownBy(() -> |
| 1389 | + runQuery("CALL gds.graph.project('g', '*', '*', {nodeProperties: \"prop\"}) YIELD nodeProjection")) |
| 1390 | + .isInstanceOf(Exception.class) |
| 1391 | + .hasMessageContaining("Loading of values of type String is currently not supported");; |
| 1392 | + |
| 1393 | + var taskStore = GraphDatabaseApiProxy.resolveDependency(db, TaskStore.class); |
| 1394 | + assertTrue(taskStore.isEmpty()); |
| 1395 | + } |
| 1396 | + |
1382 | 1397 | private Graph relPropertyGraph(String graphName, RelationshipType relationshipType, String property) {
|
1383 | 1398 | return GraphStoreCatalog
|
1384 | 1399 | .get(getUsername(), DatabaseId.of(db.databaseName()), graphName)
|
|
0 commit comments