Skip to content

Commit

Permalink
Merge pull request #1901 from wwbmmm/fix-test-bvar-fail-on-mac
Browse files Browse the repository at this point in the history
Fix test_bvar fail on mac
  • Loading branch information
zyearn authored Aug 23, 2022
2 parents 828090a + 679a937 commit 3e7eef9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/bvar_recorder_unittest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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));
}
Expand Down

0 comments on commit 3e7eef9

Please sign in to comment.