diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-09-26 10:33:32 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-09-26 10:33:32 -0400 |
commit | cfa8d04c01cb46c39f1a76005d777bd9e3ddd51d (patch) | |
tree | 73f2f4e75034fcdf6d140f7ed5b96bc72ba70f2d | |
parent | 1a95c340a77020bdb897ecb67974fa5c578a611a (diff) | |
download | stasis-cfa8d04c01cb46c39f1a76005d777bd9e3ddd51d.tar.gz |
Fix test
* Queuing a task does not fork anymore, so the default state is now UNUSED
-rw-r--r-- | tests/test_multiprocessing.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_multiprocessing.c b/tests/test_multiprocessing.c index 0b6c6ea..cd037d0 100644 --- a/tests/test_multiprocessing.c +++ b/tests/test_multiprocessing.c @@ -57,8 +57,8 @@ void test_mp_task() { char task_name[100] = {0}; sprintf(task_name, "mytask%zu", i); STASIS_ASSERT_FATAL((task = mp_pool_task(pool, task_name, NULL, commands[i])) != NULL, "Task should not be NULL"); - STASIS_ASSERT(task->pid != 0, "PID should be non-zero at this point"); - STASIS_ASSERT(task->parent_pid != MP_POOL_PID_UNUSED, "Parent PID should be non-zero"); + STASIS_ASSERT(task->pid == MP_POOL_PID_UNUSED, "PID should be non-zero at this point"); + STASIS_ASSERT(task->parent_pid == MP_POOL_PID_UNUSED, "Parent PID should be non-zero"); STASIS_ASSERT(task->status == -1, "Status should be -1 (not started yet)"); STASIS_ASSERT(strcmp(task->ident, task_name) == 0, "Wrong task identity"); STASIS_ASSERT(strstr(task->log_file, pool->log_root) != NULL, "Log file path must be in log_root"); |