Skip to content

Commit ed816e3

Browse files
committed
[feat] Add unit tests
1 parent dddfa40 commit ed816e3

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

hugegraph-loader/src/main/java/org/apache/hugegraph/loader/executor/LoadOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public final class LoadOptions implements Cloneable {
194194
"The number of parallel read pipelines. " +
195195
"Default: max(2, CPUS/2) where CPUS is the number " +
196196
"of available processors. Must be >= 1")
197-
public int parseThreads = 1;
197+
public int parseThreads = Math.max(2, CPUS / 2);
198198

199199
@Parameter(names = {"--start-file"}, arity = 1,
200200
description = "start file index for partial loading")

hugegraph-loader/src/test/java/org/apache/hugegraph/loader/test/functional/FileLoadTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,8 @@ public void testMultiFilesHaveHeader() {
11971197
"-s", configPath("multi_files_have_header/schema.groovy"),
11981198
"-g", GRAPH,
11991199
"-h", SERVER,
1200-
"--test-mode", "true"
1200+
"--test-mode", "true",
1201+
"--parser-threads", "1"
12011202
};
12021203
loadWithAuth(args);
12031204

@@ -1628,7 +1629,8 @@ public void testFilterPathBySuffix() {
16281629
"-s", configPath("filter_path_by_suffix/schema.groovy"),
16291630
"-g", GRAPH,
16301631
"-h", SERVER,
1631-
"--test-mode", "true"
1632+
"--test-mode", "true",
1633+
"--parser-threads", "1"
16321634
};
16331635
loadWithAuth(args);
16341636

0 commit comments

Comments
 (0)