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: JanusGraph#4153.

Signed-off-by: Florian Hockmann <fh@florian-hockmann.de>
  • Loading branch information
FlorianHockmann committed Dec 13, 2023
1 parent 2cd792b commit acac893
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() {
}

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

0 comments on commit acac893

Please sign in to comment.