tests/p4wq: Fix impossible sleep interval

The code here was written to "get out of the way just long enough for
the trivial context switch and callback to execute".  But on a machine
with 50 kHz ticks, that's not reliably enough time and this was
failing spuriously.  Which would have been a reasonably forgivable
mistake to make had I not written this code with this very machine in
mind...

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2021-03-01 17:29:08 -08:00 committed by Anas Nashif
commit 29b83584b0

View file

@ -260,7 +260,7 @@ static void test_p4wq_simple(void)
k_p4wq_submit(&wq, &simple_item);
zassert_false(has_run, "ran too early");
k_sleep(K_TICKS(1));
k_msleep(10);
zassert_true(has_run, "low-priority item didn't run");
/* Higher priority, should preempt us */