Skip to content

Commit

Permalink
[core] [easy] [no-op] Unnecessary code cleanup (#50247)
Browse files Browse the repository at this point in the history
Signed-off-by: dentiny <[email protected]>
  • Loading branch information
dentiny authored Feb 5, 2025
1 parent 6462f3e commit 3ac2417
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
1 change: 0 additions & 1 deletion src/ray/util/tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ ray_cc_test(
"//src/ray/util",
"//src/ray/util:pipe_logger",
"@com_google_googletest//:gtest_main",
"@com_google_absl//absl/cleanup",
],
size = "small",
tags = ["team:core"],
Expand Down
17 changes: 0 additions & 17 deletions src/ray/util/tests/pipe_logger_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <future>
#include <string_view>

#include "absl/cleanup/cleanup.h"
#include "ray/common/test/testing.h"
#include "ray/util/filesystem.h"
#include "ray/util/temporary_directory.h"
Expand All @@ -39,11 +38,6 @@ TEST(PipeLoggerTest, RedirectionTest) {
ScopedTemporaryDirectory scoped_directory;
const auto test_file_path = scoped_directory.GetDirectory() / GenerateUUIDV4();

// Delete temporary file.
absl::Cleanup cleanup_test_file = [&test_file_path]() {
EXPECT_TRUE(std::filesystem::remove(test_file_path));
};

// Take the default option, which doesn't have rotation enabled.
StreamRedirectionOption stream_redirection_opt{};
stream_redirection_opt.file_path = test_file_path.string();
Expand All @@ -63,11 +57,6 @@ TEST(PipeLoggerTestWithTee, RedirectionWithTee) {
ScopedTemporaryDirectory scoped_directory;
const auto test_file_path = scoped_directory.GetDirectory() / GenerateUUIDV4();

// Delete temporary file.
absl::Cleanup cleanup_test_file = [&test_file_path]() {
EXPECT_TRUE(std::filesystem::remove(test_file_path));
};

StreamRedirectionOption stream_redirection_opt{};
stream_redirection_opt.file_path = test_file_path.string();
stream_redirection_opt.tee_to_stdout = true;
Expand Down Expand Up @@ -98,12 +87,6 @@ TEST(PipeLoggerTestWithTee, RotatedRedirectionWithTee) {
const auto log_file_path2 =
scoped_directory.GetDirectory() / absl::StrFormat("%s.1", uuid);

// Delete temporary file.
absl::Cleanup cleanup_test_file = [&log_file_path1, &log_file_path2]() {
EXPECT_TRUE(std::filesystem::remove(log_file_path1));
EXPECT_TRUE(std::filesystem::remove(log_file_path2));
};

StreamRedirectionOption stream_redirection_opt{};
stream_redirection_opt.file_path = test_file_path.string();
stream_redirection_opt.rotation_max_size = 5;
Expand Down

0 comments on commit 3ac2417

Please sign in to comment.