From c98341e10dbca69e794269112ed2c914179fb95c Mon Sep 17 00:00:00 2001 From: Jan Jansen Date: Fri, 11 Nov 2022 08:03:42 +0100 Subject: [PATCH] mark flaky tests Signed-off-by: Jan Jansen (cherry picked from commit 2e54144c5f23560bce10ed407cb4ba41f37e5bec) --- .../core/cql/CQLConfiguredGraphFactoryTest.java | 7 +++++++ .../java/org/janusgraph/graphdb/cql/CQLGraphTest.java | 7 +++++++ .../org/janusgraph/hadoop/CQLIndexManagementIT.java | 10 ++++++++++ .../diskstorage/es/CQLElasticsearchTest.java | 9 +++++++++ .../diskstorage/cache/ExpirationCacheTest.java | 3 +-- 5 files changed, 34 insertions(+), 2 deletions(-) diff --git a/janusgraph-cql/src/test/java/org/janusgraph/core/cql/CQLConfiguredGraphFactoryTest.java b/janusgraph-cql/src/test/java/org/janusgraph/core/cql/CQLConfiguredGraphFactoryTest.java index 1daae137dff..704b39b516e 100644 --- a/janusgraph-cql/src/test/java/org/janusgraph/core/cql/CQLConfiguredGraphFactoryTest.java +++ b/janusgraph-cql/src/test/java/org/janusgraph/core/cql/CQLConfiguredGraphFactoryTest.java @@ -15,6 +15,7 @@ package org.janusgraph.core.cql; import com.datastax.driver.core.Session; +import io.github.artsok.RepeatedIfExceptionsTest; import org.apache.commons.configuration2.MapConfiguration; import org.janusgraph.JanusGraphCassandraContainer; import org.janusgraph.core.AbstractConfiguredGraphFactoryTest; @@ -130,5 +131,11 @@ public void dropGraphShouldRemoveGraphKeyspace() throws Exception { ConfiguredGraphFactory.close(graphName); } } + + @RepeatedIfExceptionsTest(repeats = 3) + @Override + public void updateConfigurationShouldRemoveGraphFromCache() throws Exception { + super.updateConfigurationShouldRemoveGraphFromCache(); + } } diff --git a/janusgraph-cql/src/test/java/org/janusgraph/graphdb/cql/CQLGraphTest.java b/janusgraph-cql/src/test/java/org/janusgraph/graphdb/cql/CQLGraphTest.java index a85e08226f4..0f2d8ce0b0e 100644 --- a/janusgraph-cql/src/test/java/org/janusgraph/graphdb/cql/CQLGraphTest.java +++ b/janusgraph-cql/src/test/java/org/janusgraph/graphdb/cql/CQLGraphTest.java @@ -37,6 +37,7 @@ import java.util.Arrays; import java.util.Random; +import java.util.concurrent.ExecutionException; import java.util.stream.Stream; import static org.janusgraph.diskstorage.cql.CQLConfigOptions.ATOMIC_BATCH_MUTATE; @@ -70,6 +71,12 @@ public void simpleLogTest() throws InterruptedException{ super.simpleLogTest(); } + @RepeatedIfExceptionsTest(repeats = 3) + @Override + public void testReindexingForEdgeIndex() throws ExecutionException, InterruptedException { + super.testReindexingForEdgeIndex(); + } + protected static Stream generateConsistencyConfigs() { return Arrays.stream(new Arguments[]{ arguments(true, true, 20, true), diff --git a/janusgraph-cql/src/test/java/org/janusgraph/hadoop/CQLIndexManagementIT.java b/janusgraph-cql/src/test/java/org/janusgraph/hadoop/CQLIndexManagementIT.java index 1fc25405663..9e60dda3182 100644 --- a/janusgraph-cql/src/test/java/org/janusgraph/hadoop/CQLIndexManagementIT.java +++ b/janusgraph-cql/src/test/java/org/janusgraph/hadoop/CQLIndexManagementIT.java @@ -14,11 +14,15 @@ package org.janusgraph.hadoop; +import io.github.artsok.RepeatedIfExceptionsTest; import org.janusgraph.JanusGraphCassandraContainer; +import org.janusgraph.diskstorage.BackendException; import org.janusgraph.diskstorage.configuration.WriteConfiguration; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; +import java.util.concurrent.ExecutionException; + @Testcontainers public class CQLIndexManagementIT extends AbstractIndexManagementIT { @Container @@ -28,4 +32,10 @@ public class CQLIndexManagementIT extends AbstractIndexManagementIT { public WriteConfiguration getConfiguration() { return cql.getConfiguration(getClass().getSimpleName().toLowerCase()).getConfiguration(); } + + @RepeatedIfExceptionsTest(repeats = 3) + @Override + public void testRepairRelationIndex() throws ExecutionException, InterruptedException, BackendException { + super.testRepairRelationIndex(); + } } diff --git a/janusgraph-es/src/test/java/org/janusgraph/diskstorage/es/CQLElasticsearchTest.java b/janusgraph-es/src/test/java/org/janusgraph/diskstorage/es/CQLElasticsearchTest.java index f38c2ae8677..4fa030f1951 100644 --- a/janusgraph-es/src/test/java/org/janusgraph/diskstorage/es/CQLElasticsearchTest.java +++ b/janusgraph-es/src/test/java/org/janusgraph/diskstorage/es/CQLElasticsearchTest.java @@ -14,12 +14,15 @@ package org.janusgraph.diskstorage.es; +import io.github.artsok.RepeatedIfExceptionsTest; import org.janusgraph.JanusGraphCassandraContainer; import org.janusgraph.diskstorage.configuration.ModifiableConfiguration; import org.junit.jupiter.api.Disabled; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; +import java.util.concurrent.ExecutionException; + @Testcontainers public class CQLElasticsearchTest extends ElasticsearchJanusGraphIndexTest { @@ -34,4 +37,10 @@ public ModifiableConfiguration getStorageConfiguration() { @Override @Disabled("CQL seems to not clear storage correctly") public void testClearStorage() {} + + @RepeatedIfExceptionsTest(repeats = 3) + @Override + public void testIndexUpdatesWithoutReindex() throws InterruptedException, ExecutionException { + super.testIndexUpdatesWithoutReindex(); + } } diff --git a/janusgraph-test/src/test/java/org/janusgraph/diskstorage/cache/ExpirationCacheTest.java b/janusgraph-test/src/test/java/org/janusgraph/diskstorage/cache/ExpirationCacheTest.java index 9492c077cad..d93eca4b18b 100644 --- a/janusgraph-test/src/test/java/org/janusgraph/diskstorage/cache/ExpirationCacheTest.java +++ b/janusgraph-test/src/test/java/org/janusgraph/diskstorage/cache/ExpirationCacheTest.java @@ -25,7 +25,6 @@ import org.janusgraph.diskstorage.keycolumnvalue.cache.ExpirationKCVSCache; import org.janusgraph.diskstorage.keycolumnvalue.cache.KCVSCache; import org.janusgraph.diskstorage.util.BufferUtil; -import org.junit.jupiter.api.Test; import java.time.Duration; import java.time.Instant; @@ -97,7 +96,7 @@ private void testExpiration(Duration expirationTime) throws Exception { verifyResults(key, keys, query, 4); } - @Test + @RepeatedIfExceptionsTest(repeats = 3) public void testGracePeriod() throws Exception { testGracePeriod(Duration.ofMillis(200)); testGracePeriod(Duration.ZERO);