mirror of
https://github.com/wassname/ray.git
synced 2026-07-16 11:21:10 +08:00
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:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user