提交 bf0a93bf 编写于 作者: O openharmony_ci 提交者: Gitee

!317 【kernel_lite】【master】fix time_posix module unstable cases

Merge pull request !317 from 南先森/kernel_lite
......@@ -421,10 +421,13 @@ HWTEST_F(AlarmTest, testTimerGetTime, Function | MediumTest | Level3)
}
getMsValue[index++] = getMillisec;
}
Msleep(1);
Msleep(150);
for (int i = 0; i < index; i++) {
/* delay should add 10 millisecond to ajust */
if (setMillisec < (delay + 10)) {
break;
}
setMillisec -= delay + 10;
EXPECT_GE(getMsValue[i], setMillisec);
LOG("%u, %u, %u", setMillisec, getMsValue[i], getMsValue[i] - setMillisec);
......@@ -633,10 +636,13 @@ HWTEST_F(AlarmTest, testGetItTimer, Function | MediumTest | Level3)
}
getMsValue[index++] = getMillisec;
}
Msleep(1);
Msleep(150);
for (int i = 0; i < index; i++) {
/* delay should add 10 millisecond to ajust */
if (setMillisec < (delay + 10)) {
break;
}
setMillisec -= delay + 10;
EXPECT_GE(getMsValue[i], setMillisec);
LOG("%u, %u, %u", setMillisec, getMsValue[i], getMsValue[i] - setMillisec);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册