From bd5aa5d9046eeb492ab412307c00644f622e3de6 Mon Sep 17 00:00:00 2001 From: Mark Harris Date: Tue, 7 Dec 2021 09:09:11 +1100 Subject: [PATCH] Fix failing tracking test (#929) Fixes #928. #920 introduced a new test for the `tracking_resource_adaptor::log_outstanding_allocations`, but that function only logs when `SPDLOG_ACTIVE_LEVEL <= SPDLOG_LEVEL_DEBUG`, so the test needs to be gated on that condition as well. Authors: - Mark Harris (https://github.com/harrism) Approvers: - Rong Ou (https://github.com/rongou) - Vyas Ramasubramani (https://github.com/vyasr) - Bradley Dice (https://github.com/bdice) URL: https://github.com/rapidsai/rmm/pull/929 --- tests/mr/device/tracking_mr_tests.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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);