Merge pull request #10698 from LMESTM/Timeout_test_do_not_call_sleep_from_thread

timeout_tests: do not call sleep from test thread
pull/10755/head
Martin Kojtal 2019-06-04 10:54:56 +01:00 committed by GitHub
commit 0ebf9617c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 6 deletions

View File

@ -264,9 +264,7 @@ void test_sleep(void)
bool deep_sleep_allowed = sleep_manager_can_deep_sleep_test_check();
TEST_ASSERT_FALSE_MESSAGE(deep_sleep_allowed, "Deep sleep should be disallowed");
while (!sem.try_acquire()) {
sleep();
}
sem.acquire();
timer.stop();
sleep_manager_unlock_deep_sleep();
@ -323,9 +321,7 @@ void test_deepsleep(void)
bool deep_sleep_allowed = sleep_manager_can_deep_sleep_test_check();
TEST_ASSERT_TRUE_MESSAGE(deep_sleep_allowed, "Deep sleep should be allowed");
while (!sem.try_acquire()) {
sleep();
}
sem.acquire();
timer.stop();
TEST_ASSERT_UINT64_WITHIN(delta_us, delay_us, timer.read_high_resolution_us());