mirror of
https://github.com/wassname/ray.git
synced 2026-07-06 05:16:30 +08:00
[fix] Fix ray.home configuration item. (#2977)
If we set `ray.home` configuration item to `""`. The current `RayConfig` will set it to current work directory, like `/User/My/Ray`. But the some other configuration items(like `redisServerExecutablePath`) will be set to `/User/My/Ray//build/src/common/thirdparty/redis/src/redis-server` by mistake. Note: There are 2 `/` between current work directory and `build/src/common....` This PR will fix this issue.
This commit is contained in:
committed by
Robert Nishihara
parent
5eaf429c53
commit
68cf194e90
@@ -16,5 +16,11 @@ public class RayConfigTest {
|
||||
Assert.assertEquals("/path/to/ray", rayConfig.rayHome);
|
||||
Assert.assertEquals(WorkerMode.DRIVER, rayConfig.workerMode);
|
||||
Assert.assertEquals(RunMode.CLUSTER, rayConfig.runMode);
|
||||
|
||||
System.setProperty("ray.home", "");
|
||||
rayConfig = RayConfig.create();
|
||||
Assert.assertEquals(System.getProperty("user.dir"), rayConfig.rayHome);
|
||||
Assert.assertEquals(System.getProperty("user.dir") +
|
||||
"/build/src/common/thirdparty/redis/src/redis-server", rayConfig.redisServerExecutablePath);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user