From db8a11d9c6e25c9aa231cd78c473f44680fdc421 Mon Sep 17 00:00:00 2001 From: Ruiyang Wang Date: Mon, 7 Oct 2024 16:29:09 -0700 Subject: [PATCH] tsan Signed-off-by: Ruiyang Wang --- src/ray/core_worker/test/dependency_resolver_test.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ray/core_worker/test/dependency_resolver_test.cc b/src/ray/core_worker/test/dependency_resolver_test.cc index 41b8a93f8bd1..d5d24e25c327 100644 --- a/src/ray/core_worker/test/dependency_resolver_test.cc +++ b/src/ray/core_worker/test/dependency_resolver_test.cc @@ -393,7 +393,8 @@ TEST(LocalDependencyResolverTest, TestInlinedObjectIds) { } TEST(LocalDependencyResolverTest, TestCancelDependencyResolution) { - auto store = std::make_shared(); + InstrumentedIOContextWithThread io_context("TestCancelDependencyResolution"); + auto store = std::make_shared(&io_context.GetIoService()); auto task_finisher = std::make_shared(); MockActorCreator actor_creator; LocalDependencyResolver resolver(*store, *task_finisher, actor_creator); @@ -418,6 +419,8 @@ TEST(LocalDependencyResolverTest, TestCancelDependencyResolution) { ASSERT_EQ(task_finisher->num_inlined_dependencies, 0); // Check for leaks. ASSERT_EQ(resolver.NumPendingTasks(), 0); + + io_context.Stop(); } // Even if dependencies are already local, the ResolveDependencies callbacks are still