Skip to content

Commit

Permalink
Add missing JUnit annotations to Berkeley tests
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
FlorianHockmann committed Nov 29, 2023
1 parent 54f9c6c commit 360f2bf
Showing 1 changed file with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public WriteConfiguration getConfiguration() {
}

@Override
@Test
public void testClearStorage() throws Exception {
tearDown();
config.set(ConfigElement.getPath(GraphDatabaseConfiguration.DROP_ON_CLEAR), true);
Expand All @@ -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,
Expand All @@ -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() {

Check notice on line 105 in janusgraph-berkeleyje/src/test/java/org/janusgraph/graphdb/berkeleyje/BerkeleyGraphTest.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

janusgraph-berkeleyje/src/test/java/org/janusgraph/graphdb/berkeleyje/BerkeleyGraphTest.java#L105

Document empty method body
}

@Override
public void testEdgeTTLWithTransactions() throws Exception {
@Test
@Disabled
public void testEdgeTTLWithTransactions() {

Check notice on line 111 in janusgraph-berkeleyje/src/test/java/org/janusgraph/graphdb/berkeleyje/BerkeleyGraphTest.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

janusgraph-berkeleyje/src/test/java/org/janusgraph/graphdb/berkeleyje/BerkeleyGraphTest.java#L111

Document empty method body
}

@Override
public void testUnsettingTTL() throws InterruptedException {
@Test
@Disabled
public void testUnsettingTTL() {

Check notice on line 117 in janusgraph-berkeleyje/src/test/java/org/janusgraph/graphdb/berkeleyje/BerkeleyGraphTest.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

janusgraph-berkeleyje/src/test/java/org/janusgraph/graphdb/berkeleyje/BerkeleyGraphTest.java#L117

Document empty method body
}

@Override
public void testVertexTTLWithCompositeIndex() throws Exception {
@Test
@Disabled
public void testVertexTTLWithCompositeIndex() {

Check notice on line 123 in janusgraph-berkeleyje/src/test/java/org/janusgraph/graphdb/berkeleyje/BerkeleyGraphTest.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

janusgraph-berkeleyje/src/test/java/org/janusgraph/graphdb/berkeleyje/BerkeleyGraphTest.java#L123

Document empty method body
}

@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.")
Expand Down

0 comments on commit 360f2bf

Please sign in to comment.