From e95578388919af6749b6a5e81f850de08c846b2d Mon Sep 17 00:00:00 2001 From: Florian Hockmann Date: Mon, 11 Mar 2024 14:17:46 +0100 Subject: [PATCH] Mark test as flaky for all backends We only annotated the test for CQL as flaky, but it's also flaky for other backends. contributor @kptfh already commented on the issue that it's also flaky for the Aerospike backend: https://github.com/JanusGraph/janusgraph/issues/1498#issuecomment-475640179 and Natalia recently commented on Discord that the test is flaky for in-memory. So, we should just move the annotation to the test itself to be not specific for any backend. Since the test is copied to `JanusGraphCustomIdTest`, we also need the annotation there (and this is also the place where Natalia hit the flaky test). Issue: #1498 (not fixed by this) Signed-off-by: Florian Hockmann --- .../org/janusgraph/graphdb/JanusGraphCustomIdTest.java | 4 +++- .../main/java/org/janusgraph/graphdb/JanusGraphTest.java | 4 +++- .../java/org/janusgraph/graphdb/cql/CQLGraphCacheTest.java | 7 ------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/janusgraph-backend-testutils/src/main/java/org/janusgraph/graphdb/JanusGraphCustomIdTest.java b/janusgraph-backend-testutils/src/main/java/org/janusgraph/graphdb/JanusGraphCustomIdTest.java index 7429a40bf4..beab93fa4a 100644 --- a/janusgraph-backend-testutils/src/main/java/org/janusgraph/graphdb/JanusGraphCustomIdTest.java +++ b/janusgraph-backend-testutils/src/main/java/org/janusgraph/graphdb/JanusGraphCustomIdTest.java @@ -15,6 +15,7 @@ package org.janusgraph.graphdb; import com.google.common.base.Preconditions; +import io.github.artsok.RepeatedIfExceptionsTest; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; import org.apache.tinkerpop.gremlin.structure.Direction; import org.apache.tinkerpop.gremlin.structure.T; @@ -300,7 +301,8 @@ public void testBasicIndexLookUp() { * @throws ExecutionException * @throws InterruptedException */ - @Test + // flaky test: https://github.com/JanusGraph/janusgraph/issues/1498 + @RepeatedIfExceptionsTest(repeats = 3) public void testIndexUpdatesWithReindexAndRemove() throws ExecutionException, InterruptedException { ModifiableConfiguration config = getModifiableConfiguration(); config.set(ALLOW_SETTING_VERTEX_ID, true, new String[0]); diff --git a/janusgraph-backend-testutils/src/main/java/org/janusgraph/graphdb/JanusGraphTest.java b/janusgraph-backend-testutils/src/main/java/org/janusgraph/graphdb/JanusGraphTest.java index 0c217d1f35..4899b74793 100644 --- a/janusgraph-backend-testutils/src/main/java/org/janusgraph/graphdb/JanusGraphTest.java +++ b/janusgraph-backend-testutils/src/main/java/org/janusgraph/graphdb/JanusGraphTest.java @@ -20,6 +20,7 @@ import com.google.common.collect.Iterators; import com.google.common.collect.Lists; import com.google.common.collect.Sets; +import io.github.artsok.RepeatedIfExceptionsTest; import org.apache.commons.configuration2.MapConfiguration; import org.apache.commons.lang.NotImplementedException; import org.apache.tinkerpop.gremlin.process.traversal.P; @@ -1939,7 +1940,8 @@ public void testVertexCentricIndexOrderingOnMetaPropertyWithCardinalityList() { finishSchema(); } - @Test + // flaky test: https://github.com/JanusGraph/janusgraph/issues/1498 + @RepeatedIfExceptionsTest(repeats = 3) public void testIndexUpdatesWithReindexAndRemove() throws InterruptedException, ExecutionException { clopen(option(LOG_SEND_DELAY, MANAGEMENT_LOG), Duration.ofMillis(0), option(KCVSLog.LOG_READ_LAG_TIME, MANAGEMENT_LOG), Duration.ofMillis(50), diff --git a/janusgraph-cql/src/test/java/org/janusgraph/graphdb/cql/CQLGraphCacheTest.java b/janusgraph-cql/src/test/java/org/janusgraph/graphdb/cql/CQLGraphCacheTest.java index 3495c9e7ab..d16c1bc9aa 100644 --- a/janusgraph-cql/src/test/java/org/janusgraph/graphdb/cql/CQLGraphCacheTest.java +++ b/janusgraph-cql/src/test/java/org/janusgraph/graphdb/cql/CQLGraphCacheTest.java @@ -37,13 +37,6 @@ public WriteConfiguration getConfiguration() { return StorageSetup.addPermanentCache(cqlContainer.getConfiguration(getClass().getSimpleName())); } - // flaky test: https://github.com/JanusGraph/janusgraph/issues/1498 - @RepeatedIfExceptionsTest(repeats = 3) - @Override - public void testIndexUpdatesWithReindexAndRemove() throws InterruptedException, ExecutionException { - super.testIndexUpdatesWithReindexAndRemove(); - } - // flaky test: https://github.com/JanusGraph/janusgraph/issues/1457 @ParameterizedRepeatedIfExceptionsTest(repeats = 3) @ValueSource(booleans = {true, false})