From 002fd9fdea1613d3d69dad174d07f5cdd9d69889 Mon Sep 17 00:00:00 2001 From: wxyu Date: Mon, 9 Sep 2019 20:16:34 +0800 Subject: [PATCH] MS-533 Update resource_test to cover dump function Former-commit-id: 01e59ea5d95d3ea72a9ec0f7ed2caaaf62e21279 --- cpp/CHANGELOG.md | 1 + cpp/unittest/scheduler/resource_test.cpp | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cpp/CHANGELOG.md b/cpp/CHANGELOG.md index 3a9a42d038..862d2f5147 100644 --- a/cpp/CHANGELOG.md +++ b/cpp/CHANGELOG.md @@ -109,6 +109,7 @@ Please mark all change in change log and use the ticket from JIRA. - MS-528 - Hide some config used future - MS-530 - Add unittest for SearchTask->Load - MS-531 - Disable next version code +- MS-533 - Update resource_test to cover dump function ## New Feature - MS-343 - Implement ResourceMgr diff --git a/cpp/unittest/scheduler/resource_test.cpp b/cpp/unittest/scheduler/resource_test.cpp index 03500941b7..8a51bac5f9 100644 --- a/cpp/unittest/scheduler/resource_test.cpp +++ b/cpp/unittest/scheduler/resource_test.cpp @@ -86,9 +86,7 @@ TEST_F(ResourceBaseTest, dump) { ASSERT_FALSE(only_executor_->Dump().empty()); ASSERT_FALSE(both_enable_->Dump().empty()); ASSERT_FALSE(both_disable_->Dump().empty()); - std::stringstream ss; - ss << only_loader_ << only_executor_ << both_enable_ << both_disable_; - ASSERT_FALSE(ss.str().empty()); + std::cout << *only_loader_ << *only_executor_ << *both_enable_ << *both_disable_; } /************ ResourceAdvanceTest ************/