Fix the java_worker_options parameter (#7537)

* fix Java CI

* Minor fix

* move json.loads out of build_java_worker_command

* lint

* fix cross language test
This commit is contained in:
Kai Yang
2020-03-12 10:44:23 +08:00
committed by GitHub
parent ba1b081477
commit 932a749fa9
6 changed files with 12 additions and 4 deletions
@@ -3,6 +3,7 @@ package org.ray.api.test;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.gson.Gson;
import java.io.File;
import java.lang.ProcessBuilder.Redirect;
import java.util.List;
@@ -77,8 +78,7 @@ public abstract class BaseMultiLanguageTest {
String classpath = Stream.of(System.getProperty("java.class.path").split(":"))
.filter(s -> !s.contains(" ") && s.contains("test"))
.collect(Collectors.joining(":"));
String workerOptions =
" -classpath " + classpath;
String workerOptions = new Gson().toJson(ImmutableList.of("-classpath", classpath));
// Start ray cluster.
List<String> startCommand = ImmutableList.of(
"ray",
@@ -52,7 +52,7 @@ def py_func_pass_python_actor_handle():
counter = Counter.remote(2)
f = ray.java_function("org.ray.api.test.CrossLanguageInvocationTest",
"callPythonActorHandle")
r = f.remote(counter._serialization_helper())
r = f.remote(counter._serialization_helper()[0])
return ray.get(r)