Skip to content

Commit

Permalink
Assert max uid to detect uid range issues (#275)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
EnricoMi authored Dec 16, 2024
1 parent 72d1349 commit ba5973a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ trait DgraphTestCluster extends BeforeAndAfterAll {

lazy val dgraph = new DgraphCluster(alwaysStartUp = clusterAlwaysStartUp)

override protected def beforeAll(): Unit = dgraph.start()
override protected def beforeAll(): Unit = {
dgraph.start()
assert(dgraph.highestUid < 1024)
}

override protected def afterAll(): Unit = dgraph.stop()
}
Expand Down

0 comments on commit ba5973a

Please sign in to comment.