Skip to content

Commit 1becae5

Browse files
committed
fix tinkerpop test open graph panic
1 parent f5a53a5 commit 1becae5

File tree

1 file changed

+4
-0
lines changed
  • hugegraph-pd/hg-pd-client/src/main/java/org/apache/hugegraph/pd/client

1 file changed

+4
-0
lines changed

hugegraph-pd/hg-pd-client/src/main/java/org/apache/hugegraph/pd/client/PDConfig.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ public String toString() {
101101
}
102102

103103
public PDConfig setAuthority(String userName, String pwd) {
104+
// If userName is null or empty, keep default values for test environment
105+
if (StringUtils.isEmpty(userName)) {
106+
return this;
107+
}
104108
this.userName = userName;
105109
String auth = userName + ':' + pwd;
106110
this.authority = Base64.getEncoder().encodeToString(auth.getBytes(UTF_8));

0 commit comments

Comments
 (0)