You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by ji...@apache.org on 2022/08/23 19:34:27 UTC
[incubator-brpc] branch master updated: Fix test_bvar fail on mac
This is an automated email from the ASF dual-hosted git repository.
jiashunzhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git
The following commit(s) were added to refs/heads/master by this push:
new 679a9375 Fix test_bvar fail on mac
new 3e7eef98 Merge pull request #1901 from wwbmmm/fix-test-bvar-fail-on-mac
679a9375 is described below
commit 679a93758f240dd6705633060528c35ee611cce8
Author: wwbmmm <ww...@163.com>
AuthorDate: Mon Aug 22 11:12:38 2022 +0800
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 6e05c62e..2f6ea20e 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));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org