Skip to content

Commit

Permalink
fix part of edge id related tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Thespica committed Oct 1, 2024
1 parent 1e00082 commit 6cc46a8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/client-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
cd hugegraph-client && ls *
mvn test -Dtest=UnitTestSuite -ntp || true
mvn test -Dtest=ApiTestSuite || true
mvn test -Dtest=FuncTestSuite || true
mvn test -Dtest=FuncTestSuite
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,10 @@ public void targetLabel(String targetLabel) {
public String name() {
if (this.name == null) {
String[] idParts = SplicingIdGenerator.split(this.id);
E.checkState(idParts.length == 4,
"The edge id must be formatted by 4 parts, " +
E.checkState(idParts.length == 5 || idParts.length == 6,
"The edge id must be formatted by 5~6 parts, " +
"actual is %s", idParts.length);
// TODO(Thespica): how to get the name of the edge?
this.name = idParts[2];
}
return this.name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ public void testGetNotExist() {
// TODO: id to be modified
edgeAPI.get(edgeId);
}, e -> {
Assert.assertContains("Edge id must be formatted as 4~5 parts, " +
Assert.assertContains("Edge id must be formatted as 5~6 parts, " +
"but got 1 parts: 'not-exist-edge-id'",
e.getMessage());
Assert.assertInstanceOf(ServerException.class, e);
Expand Down

0 comments on commit 6cc46a8

Please sign in to comment.