Increase leniancy in an inherently flaky test.
The example in the bug was 6ms instead of 5ms. Try 10ms? Bug: http://b/178437652 Test: treehugger Change-Id: I192d602fa4f3499cbf072507245543d0435c5329
This commit is contained in:
parent
69d44fd55b
commit
82c3c11c18
1 changed files with 2 additions and 2 deletions
|
@ -851,11 +851,11 @@ TEST(time, clock_getres_unknown) {
|
|||
}
|
||||
|
||||
TEST(time, clock) {
|
||||
// clock(3) is hard to test, but a 1s sleep should cost less than 5ms.
|
||||
// clock(3) is hard to test, but a 1s sleep should cost less than 10ms.
|
||||
clock_t t0 = clock();
|
||||
sleep(1);
|
||||
clock_t t1 = clock();
|
||||
ASSERT_LT(t1 - t0, 5 * (CLOCKS_PER_SEC / 1000));
|
||||
ASSERT_LT(t1 - t0, 10 * (CLOCKS_PER_SEC / 1000));
|
||||
}
|
||||
|
||||
static pid_t GetInvalidPid() {
|
||||
|
|
Loading…
Reference in a new issue