Skip to content

Commit 374e221

Browse files
committed
fix tinkerpop test open graph panic and other bugs
1 parent 0e5f7ba commit 374e221

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

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));

hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/io/HugeGraphSONModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public class HugeGraphSONModule extends TinkerPopJacksonModule {
8787

8888
private static final String TYPE_NAMESPACE = "hugegraph";
8989

90-
private static final boolean OPTIMIZE_SERIALIZE = true;
90+
private static boolean OPTIMIZE_SERIALIZE = true;
9191

9292
@SuppressWarnings("rawtypes")
9393
private static final Map<Class, String> TYPE_DEFINITIONS;

0 commit comments

Comments
 (0)