diff --git a/tests/mr/device/tracking_mr_tests.cpp b/tests/mr/device/tracking_mr_tests.cpp index ff84e784e..e804cf0ea 100644 --- a/tests/mr/device/tracking_mr_tests.cpp +++ b/tests/mr/device/tracking_mr_tests.cpp @@ -213,8 +213,11 @@ TEST(TrackingTest, LogOutstandingAllocations) } rmm::logger().set_level(spdlog::level::debug); - mr.log_outstanding_allocations(); + EXPECT_NO_THROW(mr.log_outstanding_allocations()); + +#if SPDLOG_ACTIVE_LEVEL <= SPDLOG_LEVEL_DEBUG EXPECT_NE(oss.str().find("Outstanding Allocations"), std::string::npos); +#endif for (auto& allocation : allocations) { mr.deallocate(allocation, ten_MiB);