JanusGraph / JanusGraph/janusgraph

Berkeley test failing: testConsistencyEnforcement

Open
#4,153 0 comments 0 reactions 0 assignees View on GitHub
area/testing kind/bug/possible storage/berkeleydb
Dominant language
Java
Stars
5.8k
Forks
1.2k
Avg merge
13h 53m
Merged PRs (30d)
6

Description

This test is failing in #4135 which simply updates JUnit. However, this test already seems to fail on `master`, but for some reason it isn't executed there. I've noticed that IntelliJ complains about this test: _Old style JUnit test method 'testConsistencyEnforcement()' in JUnit 4 class_ and its suggested fix simply adds the `@Test` annotation to it. If I follow that suggestion and add the annotation, then the test is also executed on `master` and fails there.

So, it seems the JUnit update in #4135 just changes how JUnit discovers the tests which seems to include this test now. I suggest that we exclude the test now explicitly in #4135 so it doesn't stop us from updating JUnit and because this test has effectively been disabled for a long time already, but we should of course still look into it to find out why it is actually failing.

### Stack Trace (if you have one)

```
[ERROR] Tests run: 203, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 258.789 s <<< FAILURE! - in org.janusgraph.graphdb.berkeleyje.BerkeleyGraphTest
[ERROR] org.janusgraph.graphdb.berkeleyje.BerkeleyGraphTest.testConsistencyEnforcement Time elapsed: 0.196 s <<< ERROR!
java.lang.NullPointerException
at org.janusgraph.diskstorage.configuration.ConfigOption.getEnumValue(ConfigOption.java:243)
at org.janusgraph.graphdb.berkeleyje.BerkeleyGraphTest.testConsistencyEnforcement(BerkeleyGraphTest.java:94)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
```

Contributor guide

Open the contributing guide

Research direction

Start with BerkeleyGraphTest.java at line 94 and the stack trace through ConfigOption.java:243. Compare how testConsistencyEnforcement is discovered before and after the JUnit update, then determine why it raises a NullPointerException; done means the test has a defined, passing or intentionally excluded outcome without masking the underlying failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.