Skip to content

Commit ba5973a

Browse files
authored
Assert max uid to detect uid range issues (#275)
## Checklist before submitting - [X] Did you read the [contributing guide](https://github.com/G-Research/spark-dgraph-connector/blob/contributing-guidelines/CONTRIBUTING.md)? - [ ] Did you update the docs? - [ ] Did you write any tests to validate this change? ## Description Asserts the max uid of the Dgraph instance used for unit tests to flag unexpected large uid ranges. ## Review process for approval 1. All tests and other checks must succeed. 2. At least one core contributors must review and approve. 3. If a core contributor requests changes, they must be addressed.
1 parent 72d1349 commit ba5973a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/test/scala/uk/co/gresearch/spark/dgraph/DgraphTestCluster.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ trait DgraphTestCluster extends BeforeAndAfterAll {
4141

4242
lazy val dgraph = new DgraphCluster(alwaysStartUp = clusterAlwaysStartUp)
4343

44-
override protected def beforeAll(): Unit = dgraph.start()
44+
override protected def beforeAll(): Unit = {
45+
dgraph.start()
46+
assert(dgraph.highestUid < 1024)
47+
}
4548

4649
override protected def afterAll(): Unit = dgraph.stop()
4750
}

0 commit comments

Comments
 (0)