-
Notifications
You must be signed in to change notification settings - Fork 112
feat(client): add support for skipping required checks in HugeClientBuilder #718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,51 @@ | ||||
| package org.apache.hugegraph.unit; | ||||
|
|
||||
| import org.apache.hugegraph.driver.HugeClient; | ||||
| import org.apache.hugegraph.driver.HugeClientBuilder; | ||||
| import org.apache.hugegraph.rest.ClientException; | ||||
|
||||
| import org.apache.hugegraph.rest.ClientException; |
Copilot
AI
Mar 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests call builder.build(), which constructs HugeClient and triggers server API version checks over HTTP. If no server is running, this can block up to the default 20s timeout per test, making the suite slow/flaky. Consider avoiding the network path (e.g., assert only that constructor/build validation doesn’t throw) or explicitly set very small connect/read timeouts before build() so failures return quickly.
Copilot
AI
Mar 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Test(expected = IllegalArgumentException.class) here is satisfied by the exception thrown in the constructor (because graph is null) before build() is reached, so it doesn’t actually validate the new conditional checks inside build(). To cover the build() path, construct with a non-null graph, then set configGraph(null) (and/or configUrl(null)) before calling build() and asserting the expected behavior with/without skipRequiredChecks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These wrapped generic type lines include trailing whitespace before the newline (after the comma). This is easy to miss in reviews and can create noisy diffs or fail whitespace-sensitive tooling; please remove the trailing spaces while keeping the line wrap.