This is an automated email from the ASF dual-hosted git repository. alexey pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 12d9a84b49675a20ad10f1f330cb3ed083ea4e92 Author: Alexey Serbin <[email protected]> AuthorDate: Tue Jun 2 12:18:56 2020 -0700 [maintenance_manager-test] small clean-up log retention scenario Updated the expected string to be resistant to memory usage fluctuations. The motivation for this change is seeing sporadic failures due to the discrepancy in reported memory usage: e.g., 2.00% instead of 0.00% was reported by dist-test here: http://dist-test.cloudera.org/job?job_id=aserbin.1591087472.56061 Change-Id: I4c0a80412f6e6b0d8d594e3310e6d6e26c12267a Reviewed-on: http://gerrit.cloudera.org:8080/16025 Tested-by: Kudu Jenkins Reviewed-by: Andrew Wong <[email protected]> --- src/kudu/util/maintenance_manager-test.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/kudu/util/maintenance_manager-test.cc b/src/kudu/util/maintenance_manager-test.cc index c2d6301..3a0954d 100644 --- a/src/kudu/util/maintenance_manager-test.cc +++ b/src/kudu/util/maintenance_manager-test.cc @@ -390,20 +390,20 @@ TEST_F(MaintenanceManagerTest, TestPrioritizeLogRetentionUnderMemoryPressure) { auto op_and_why = manager_->FindBestOp(); ASSERT_EQ(&op1, op_and_why.first); - EXPECT_EQ(op_and_why.second, "under memory pressure (0.00% used), 100 bytes log retention, and " - "flush 100 bytes memory"); + EXPECT_STR_CONTAINS( + op_and_why.second, "100 bytes log retention, and flush 100 bytes memory"); manager_->UnregisterOp(&op1); op_and_why = manager_->FindBestOp(); ASSERT_EQ(&op2, op_and_why.first); - EXPECT_EQ(op_and_why.second, "under memory pressure (0.00% used), 100 bytes log retention, and " - "flush 99 bytes memory"); + EXPECT_STR_CONTAINS( + op_and_why.second, "100 bytes log retention, and flush 99 bytes memory"); manager_->UnregisterOp(&op2); op_and_why = manager_->FindBestOp(); ASSERT_EQ(&op3, op_and_why.first); - EXPECT_EQ(op_and_why.second, "under memory pressure (0.00% used), 99 bytes log retention, and " - "flush 101 bytes memory"); + EXPECT_STR_CONTAINS( + op_and_why.second, "99 bytes log retention, and flush 101 bytes memory"); manager_->UnregisterOp(&op3); }
