Skip to content

Commit

Permalink
Fix failing tracking test (#929)
Browse files Browse the repository at this point in the history
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: #929
  • Loading branch information
harrism authored Dec 6, 2021
1 parent d52c365 commit bd5aa5d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/mr/device/tracking_mr_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bd5aa5d

Please sign in to comment.