Skip to content

Commit 93239a8

Browse files
authored
Fix flaky tests for vectors (#844)
1 parent 6a349b6 commit 93239a8

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

core/src/test/java/apoc/meta/MetaTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ public class MetaTest {
9090
"apoc.meta.graphSample",
9191
"apoc.meta.subGraph"))
9292
.withSetting(GraphDatabaseInternalSettings.cypher_enable_vector_type, true)
93+
.withSetting(GraphDatabaseInternalSettings.latest_kernel_version, Byte.MAX_VALUE)
94+
.withSetting(GraphDatabaseInternalSettings.latest_runtime_version, Integer.MAX_VALUE)
9395
.withSetting(
9496
newBuilder("internal.dbms.debug.track_cursor_close", BOOL, false)
9597
.build(),

core/src/test/java/apoc/util/UtilsTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import org.junit.BeforeClass;
4343
import org.junit.ClassRule;
4444
import org.junit.Test;
45+
import org.neo4j.configuration.GraphDatabaseInternalSettings;
4546
import org.neo4j.graphdb.Label;
4647
import org.neo4j.graphdb.QueryExecutionException;
4748
import org.neo4j.graphdb.RelationshipType;
@@ -50,7 +51,6 @@
5051
import org.neo4j.test.rule.DbmsRule;
5152
import org.neo4j.test.rule.ImpermanentDbmsRule;
5253
import org.neo4j.values.storable.RandomValues;
53-
import org.neo4j.values.storable.ValueCategory;
5454
import org.neo4j.values.storable.ValueType;
5555

5656
/**
@@ -63,7 +63,10 @@ public class UtilsTest {
6363
private static final String COMPLEX_STRING = "Mätrix II 哈哈\uD83D\uDE04123";
6464

6565
@ClassRule
66-
public static DbmsRule db = new ImpermanentDbmsRule();
66+
public static DbmsRule db = new ImpermanentDbmsRule()
67+
.withSetting(GraphDatabaseInternalSettings.cypher_enable_vector_type, true)
68+
.withSetting(GraphDatabaseInternalSettings.latest_kernel_version, Byte.MAX_VALUE)
69+
.withSetting(GraphDatabaseInternalSettings.latest_runtime_version, Integer.MAX_VALUE);
6770

6871
@BeforeClass
6972
public static void setUp() {
@@ -340,7 +343,6 @@ public void hashIsStable(String hashFunc) {
340343
final var seed = new Random().nextLong();
341344
final var rand = RandomValues.create(new Random(seed));
342345
final var randStorables = stream(ValueType.values())
343-
.filter(t -> t.valueGroup.category().equals(ValueCategory.VECTOR))
344346
.map(t -> rand.nextValueOfType(t).asObject())
345347
.toList();
346348
final var randMap =

0 commit comments

Comments
 (0)