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