mirror of
https://github.com/wassname/ray.git
synced 2026-07-04 05:52:54 +08:00
[Java] Throw exception if Ray.init() is not called and users try to access ray API (#10497)
This commit is contained in:
@@ -91,7 +91,7 @@ public abstract class BaseMultiLanguageTest {
|
||||
}
|
||||
|
||||
// Connect to the cluster.
|
||||
Assert.assertNull(Ray.internal());
|
||||
Assert.assertFalse(Ray.isInitialized());
|
||||
System.setProperty("ray.redis.address", "127.0.0.1:6379");
|
||||
System.setProperty("ray.object-store.socket-name", PLASMA_STORE_SOCKET_NAME);
|
||||
System.setProperty("ray.raylet.socket-name", RAYLET_SOCKET_NAME);
|
||||
|
||||
@@ -19,7 +19,7 @@ public class BaseTest {
|
||||
|
||||
@BeforeMethod(alwaysRun = true)
|
||||
public void setUpBase(Method method) {
|
||||
Assert.assertNull(Ray.internal());
|
||||
Assert.assertFalse(Ray.isInitialized());
|
||||
Ray.init();
|
||||
// These files need to be deleted after each test case.
|
||||
filesToDelete = ImmutableList.of(
|
||||
|
||||
Reference in New Issue
Block a user