From 360f2bfee7056213b0258ba2fc0ed1728b660244 Mon Sep 17 00:00:00 2001 From: Florian Hockmann Date: Wed, 29 Nov 2023 15:02:39 +0100 Subject: [PATCH] Add missing JUnit annotations to Berkeley tests Some tests weren't executed prior to the JUnit update because they lacked the `@Test` annotation. I also added the `@Disabled` annotation to tests which were overriden with an empty test to show the intent for this. One test is failing with the added `@Test` annotation, but it was already failing before, but just wasn't executed. So, this now explicitly ignores the test, but we should of course still find out what the underlying problem is: #4153. Signed-off-by: Florian Hockmann --- .../graphdb/berkeleyje/BerkeleyGraphTest.java | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/janusgraph-berkeleyje/src/test/java/org/janusgraph/graphdb/berkeleyje/BerkeleyGraphTest.java b/janusgraph-berkeleyje/src/test/java/org/janusgraph/graphdb/berkeleyje/BerkeleyGraphTest.java index 17a4f6408d..8f91e09d8d 100644 --- a/janusgraph-berkeleyje/src/test/java/org/janusgraph/graphdb/berkeleyje/BerkeleyGraphTest.java +++ b/janusgraph-berkeleyje/src/test/java/org/janusgraph/graphdb/berkeleyje/BerkeleyGraphTest.java @@ -68,6 +68,7 @@ public WriteConfiguration getConfiguration() { } @Override + @Test public void testClearStorage() throws Exception { tearDown(); config.set(ConfigElement.getPath(GraphDatabaseConfiguration.DROP_ON_CLEAR), true); @@ -86,6 +87,8 @@ public void testVertexCentricQuerySmall() { } @Override + @Test + @Disabled("#4153: Tests fails with NPE for some reason") public void testConsistencyEnforcement() { // Check that getConfiguration() explicitly set serializable isolation // This could be enforced with a JUnit assertion instead of a Precondition, @@ -96,27 +99,34 @@ public void testConsistencyEnforcement() { super.testConsistencyEnforcement(); } - // BerkeleyJE support only hour discrete TTL, we try speed up internal - // clock but tests so flaky. See BerkeleyStorageSetup @Override - public void testEdgeTTLTiming() throws Exception { + @Test + @Disabled("BerkeleyJE support only hour discrete TTL, we try speed up internal clock but tests so flaky. See BerkeleyStorageSetup") + public void testEdgeTTLTiming() { } @Override - public void testEdgeTTLWithTransactions() throws Exception { + @Test + @Disabled + public void testEdgeTTLWithTransactions() { } @Override - public void testUnsettingTTL() throws InterruptedException { + @Test + @Disabled + public void testUnsettingTTL() { } @Override - public void testVertexTTLWithCompositeIndex() throws Exception { + @Test + @Disabled + public void testVertexTTLWithCompositeIndex() { } @Override + @Test + @Disabled("TODO: Figure out why this is failing in BerkeleyDB!!") public void testConcurrentConsistencyEnforcement() { - //Do nothing TODO: Figure out why this is failing in BerkeleyDB!! } @Disabled("Unable to run on GitHub Actions.")