Skip to content

Commit

Permalink
[HOTFIX]fix some compilation failures in core worker test (ray-projec…
Browse files Browse the repository at this point in the history
…t#22855)

There're some compilation failures in core worker test when we build project using `bazel build //:all`. It seems broken and not integrated in CI.
  • Loading branch information
WangTaoTheTonic authored Mar 8, 2022
1 parent 9aa0b4e commit 4576f53
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/ray/core_worker/test/core_worker_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -991,27 +991,27 @@ TEST(TestOverrideRuntimeEnv, TestOverrideEnvVars) {
TEST(TestOverrideRuntimeEnv, TestPyModulesInherit) {
rpc::RuntimeEnv child;
auto parent = std::make_shared<rpc::RuntimeEnv>();
parent->mutable_python_runtime_env()->mutable_dependent_modules()->Add("s3://456");
parent->mutable_python_runtime_env()->mutable_py_modules()->Add("s3://456");
parent->mutable_uris()->mutable_py_modules_uris()->Add("s3://456");
auto result = CoreWorker::OverrideRuntimeEnv(child, parent);
ASSERT_EQ(result.python_runtime_env().dependent_modules().size(), 1);
ASSERT_EQ(result.python_runtime_env().dependent_modules()[0], "s3://456");
ASSERT_EQ(result.python_runtime_env().py_modules().size(), 1);
ASSERT_EQ(result.python_runtime_env().py_modules()[0], "s3://456");
ASSERT_EQ(result.uris().py_modules_uris().size(), 1);
ASSERT_EQ(result.uris().py_modules_uris()[0], "s3://456");
}

TEST(TestOverrideRuntimeEnv, TestOverridePyModules) {
rpc::RuntimeEnv child;
auto parent = std::make_shared<rpc::RuntimeEnv>();
child.mutable_python_runtime_env()->mutable_dependent_modules()->Add("s3://123");
child.mutable_python_runtime_env()->mutable_py_modules()->Add("s3://123");
child.mutable_uris()->mutable_py_modules_uris()->Add("s3://123");
parent->mutable_python_runtime_env()->mutable_dependent_modules()->Add("s3://456");
parent->mutable_python_runtime_env()->mutable_dependent_modules()->Add("s3://789");
parent->mutable_python_runtime_env()->mutable_py_modules()->Add("s3://456");
parent->mutable_python_runtime_env()->mutable_py_modules()->Add("s3://789");
parent->mutable_uris()->mutable_py_modules_uris()->Add("s3://456");
parent->mutable_uris()->mutable_py_modules_uris()->Add("s3://789");
auto result = CoreWorker::OverrideRuntimeEnv(child, parent);
ASSERT_EQ(result.python_runtime_env().dependent_modules().size(), 1);
ASSERT_EQ(result.python_runtime_env().dependent_modules()[0], "s3://123");
ASSERT_EQ(result.python_runtime_env().py_modules().size(), 1);
ASSERT_EQ(result.python_runtime_env().py_modules()[0], "s3://123");
ASSERT_EQ(result.uris().py_modules_uris().size(), 1);
ASSERT_EQ(result.uris().py_modules_uris()[0], "s3://123");
}
Expand Down
2 changes: 1 addition & 1 deletion src/ray/core_worker/test/mock_worker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class MockWorker {
// Merge all the content from input args.
std::vector<uint8_t> buffer;
for (const auto &arg : args) {
auto &data = arg->GetData();
auto data = arg->GetData();
buffer.insert(buffer.end(), data->Data(), data->Data() + data->Size());
}
if (buffer.size() >= 8) {
Expand Down

0 comments on commit 4576f53

Please sign in to comment.