/* Validate the behavior of cooperative thread when it sleeps. 
Create 3 threads of priority -2, -1 and 0. Put the main thread in timeout queue by calling k_sleep() which is cooperative. Check if all the threads gets executed.  */
ZTEST(threads_scheduling, test_sleep_cooperative)
/* Validate the behavior of cooperative thread when it sleeps. 
Create 3 threads of priority -2, -1 and 0. Put the main thread in timeout queue by calling k_sleep() which is cooperative. Check if all the threads gets executed.  */
ZTEST(threads_scheduling, test_sleep_cooperative)
{
	init_prio = -1;
	setup_threads();
	spawn_threads(0);
	k_sleep(K_MSEC(100));
	for (int i = 0; i < THREADS_NUM; i++) {
		zassert_true(tdata[i].executed == 1);
	}
	teardown_threads();
}