feat(job-array-single-wal-record): add WAL_JOB_ARRAY_SUBMIT record type
Adds the array-shaped WAL entry type (distinct from WAL_JOB_SUBMIT, value 11 in the unused WAL_JOB_* gap) and classifies it WAIT-mode via wal_classify, matching the single-job type's commit-barrier semantics. No dispatch/apply wiring yet -- foundation for task 2.x/3.x. Task 1.1 of job-array-single-wal-record.
This commit is contained in:
parent
895a204438
commit
2e62e73d84
4 changed files with 197 additions and 0 deletions
|
|
@ -171,6 +171,22 @@ static void test_classify_job_submit_is_wait(void)
|
|||
printf("test_classify_job_submit_is_wait: PASS\n");
|
||||
}
|
||||
|
||||
static void test_classify_job_array_submit_is_wait(void)
|
||||
{
|
||||
/* Arrange / Act */
|
||||
wal_commit_mode_t mode = wal_classify(WAL_JOB_ARRAY_SUBMIT,
|
||||
HOOK_DETAIL_JOB_NEW);
|
||||
|
||||
/* Assert: a job-array submission is request-shaped exactly like a
|
||||
* single-job submission — one requester awaiting the commit barrier
|
||||
* before reply (job-array-single-wal-record task 1.1) */
|
||||
TEST_ASSERT_EQUAL_INT_MESSAGE(WAL_MODE_WAIT, mode,
|
||||
"WAL_JOB_ARRAY_SUBMIT must classify WAIT (request-shaped, same as "
|
||||
"WAL_JOB_SUBMIT)");
|
||||
|
||||
printf("test_classify_job_array_submit_is_wait: PASS\n");
|
||||
}
|
||||
|
||||
static void test_classify_queue_ctrl_is_wait(void)
|
||||
{
|
||||
/* Arrange / Act */
|
||||
|
|
@ -266,6 +282,7 @@ static void test_classify_is_total_over_wal_entry_type(void)
|
|||
const char *name;
|
||||
} all_types[] = {
|
||||
{ WAL_JOB_SUBMIT, HOOK_DETAIL_JOB_NEW, "WAL_JOB_SUBMIT" },
|
||||
{ WAL_JOB_ARRAY_SUBMIT, HOOK_DETAIL_JOB_NEW, "WAL_JOB_ARRAY_SUBMIT" },
|
||||
{ WAL_JOB_START, HOOK_DETAIL_JOB_START, "WAL_JOB_START" },
|
||||
{ WAL_JOB_FINISH, HOOK_DETAIL_JOB_EXIT, "WAL_JOB_FINISH" },
|
||||
{ WAL_JOB_FAIL, HOOK_DETAIL_JOB_FAIL, "WAL_JOB_FAIL" },
|
||||
|
|
@ -1714,6 +1731,7 @@ void test_commit_barrier_rollout(void)
|
|||
UNITY_BEGIN();
|
||||
/* Task 1.1 — classification totality + RETAIN routing (Req 2.1, 2.2, 3.1) */
|
||||
RUN_TEST(test_classify_job_submit_is_wait);
|
||||
RUN_TEST(test_classify_job_array_submit_is_wait);
|
||||
RUN_TEST(test_classify_queue_ctrl_is_wait);
|
||||
RUN_TEST(test_classify_worker_ctrl_detail_split);
|
||||
RUN_TEST(test_classify_all_job_state_types_are_retain);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue