Skip to content
Permalink
Browse files
improve ci config (#136)
  • Loading branch information
coderzc committed Nov 4, 2021
1 parent 3c50af6 commit 1d45f5d9610ec504a9d0fc34973a1255fc6ffbb7
Showing 3 changed files with 19 additions and 5 deletions.
@@ -56,8 +56,6 @@ public void testRunAlgorithm() throws InterruptedException {
public void setAlgorithmParameters(Map<String, String> params) {
params.put(ComputerOptions.OUTPUT_CLASS.name(),
DegreeCentralityTestOutput.class.getName());
params.put(ComputerOptions.OUTPUT_HDFS_USER.name(),
System.getProperty("user.name"));
super.setAlgorithmParameters(params);
}
}
@@ -208,7 +208,7 @@ private void createCRD(KubernetesClient client) {
.load(new File("../computer-k8s-operator/manifest" +
"/hugegraph-computer-crd.v1beta1.yaml"));
crd.createOrReplace();
crd.waitUntilReady(10, TimeUnit.SECONDS);
crd.waitUntilReady(2, TimeUnit.SECONDS);
Assert.assertNotNull(crd.get());
}
}
@@ -80,6 +80,24 @@ public class UnitTestSuite {

private static final Logger LOG = Log.logger(UnitTestSuite.class);

static {
Whitebox.setInternalState(ComputerOptions.BSP_ETCD_ENDPOINTS,
"defaultValue",
"http://localhost:2579");
Whitebox.setInternalState(ComputerOptions.HUGEGRAPH_URL,
"defaultValue",
"http://127.0.0.1:8080");
Whitebox.setInternalState(ComputerOptions.HUGEGRAPH_GRAPH_NAME,
"defaultValue",
"hugegraph");
Whitebox.setInternalState(ComputerOptions.OUTPUT_HDFS_URL,
"defaultValue",
"hdfs://127.0.0.1:9000");
Whitebox.setInternalState(ComputerOptions.OUTPUT_HDFS_USER,
"defaultValue",
System.getProperty("user.name"));
}

@BeforeClass
public static void setup() throws ClassNotFoundException {
LOG.info("Setup for UnitTestSuite of hugegraph-computer");
@@ -91,8 +109,6 @@ public static void setup() throws ClassNotFoundException {
OptionSpace.register("computer-rpc",
"com.baidu.hugegraph.config.RpcOptions");

Whitebox.setInternalState(ComputerOptions.BSP_ETCD_ENDPOINTS,
"defaultValue", "http://localhost:2579");
UnitTestBase.updateOptions(
ComputerOptions.ALGORITHM_RESULT_CLASS, LongValue.class.getName()
);

0 comments on commit 1d45f5d

Please sign in to comment.