[hotfix] Fix the failure of java test (#27183) (#27192)

Signed-off-by: 久龙 <guyang.sgy@antfin.com>
This commit is contained in:
Guyang Song 2022-07-29 07:28:07 +08:00 committed by GitHub
parent f50729b2ed
commit 950939c7dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -217,9 +217,13 @@ public class RayConfig {
jarUrls = config.getStringList(jarsPath); jarUrls = config.getStringList(jarsPath);
} }
runtimeEnvImpl = new RuntimeEnvImpl(); runtimeEnvImpl = new RuntimeEnvImpl();
if (!envVars.isEmpty()) {
runtimeEnvImpl.set(RuntimeEnvName.ENV_VARS, envVars); runtimeEnvImpl.set(RuntimeEnvName.ENV_VARS, envVars);
}
if (!jarUrls.isEmpty()) {
runtimeEnvImpl.set(RuntimeEnvName.JARS, jarUrls); runtimeEnvImpl.set(RuntimeEnvName.JARS, jarUrls);
} }
}
{ {
loggers = new ArrayList<>(); loggers = new ArrayList<>();

View file

@ -63,6 +63,8 @@ class JavaJarsPlugin(RuntimeEnvPlugin):
context: RuntimeEnvContext, context: RuntimeEnvContext,
logger: Optional[logging.Logger] = default_logger, logger: Optional[logging.Logger] = default_logger,
) -> int: ) -> int:
if not uri:
return 0
if is_jar_uri(uri): if is_jar_uri(uri):
module_dir = await self._download_jars(uri=uri, logger=logger) module_dir = await self._download_jars(uri=uri, logger=logger)
else: else: