From 679a93758f240dd6705633060528c35ee611cce8 Mon Sep 17 00:00:00 2001 From: wwbmmm Date: Mon, 22 Aug 2022 11:12:38 +0800 Subject: [PATCH] Fix test_bvar fail on mac --- test/bvar_recorder_unittest.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/bvar_recorder_unittest.cpp b/test/bvar_recorder_unittest.cpp index 6e05c62e8f..2f6ea20eaa 100644 --- a/test/bvar_recorder_unittest.cpp +++ b/test/bvar_recorder_unittest.cpp @@ -219,8 +219,8 @@ TEST(RecorderTest, latency_recorder_qps_accuracy) { lr << 1; } }; - write(lr1, 100); - write(lr2, 101); + write(lr1, 10); + write(lr2, 11); write(lr3, 3); write(lr4, 1); usleep(1000000); // wait sampler to sample 1 time @@ -237,13 +237,13 @@ TEST(RecorderTest, latency_recorder_qps_accuracy) { double err = fabs(qps_sum / 1000.0 - exp_qps); return err; }; - ASSERT_GT(0.1, read(lr1, 100/2.0)); - ASSERT_GT(0.1, read(lr2, 101/2.0)); + ASSERT_GT(0.1, read(lr1, 10/2.0)); + ASSERT_GT(0.1, read(lr2, 11/2.0)); ASSERT_GT(0.1, read(lr3, 3/2.0)); ASSERT_GT(0.1, read(lr4, 1/2.0)); - ASSERT_GT(0.1, read(lr1, 100/3.0, 3)); - ASSERT_GT(0.1, read(lr2, 101/3.0, 3)); + ASSERT_GT(0.1, read(lr1, 10/3.0, 3)); + ASSERT_GT(0.1, read(lr2, 11/3.0, 3)); ASSERT_GT(0.1, read(lr3, 3/3.0, 3)); ASSERT_GT(0.1, read(lr4, 1/3.0, 3)); }