test(job-array-single-wal-record): end-to-end integration test for the compact push

Cross-daemon integration test, test-only, spanning the scheduler (C)
and API-server (Go/CGO) receive paths built in tasks 5.1-5.4/5.3b.

Drives real xce_encode()/xce_decode() wire bytes through the actual
production dispatch chain on both daemons -- extract_data() ->
scheduler_req_handler() -> sched_handle_dataset() ->
sched_on_job_array() and go_push_handler() -> handleDataset() ->
cJobArrayToModels()/dispatchJobArray() -- skipping only vtask_entry()'s
~10 lines of static glue, mirrored verbatim in test code (the
if (callnext) treats-any-nonzero-as-proceed behavior that caused
5.3b's bug is reproduced exactly).

Redelivery is tested via genuinely independent fresh decodes of
separately-encoded bytes, not a decode-once-call-twice shortcut.
Bug-catching capability proven by temporarily reverting task 5.3b's
fix and confirming both the C and Go tests fail meaningfully, then
restoring to green -- confirmed independently by both the implementer
and reviewer.

Task 5.5 of job-array-single-wal-record (Requirements 6.1-6.5, 8.4).
This completes Phase 5 (Compact Scheduler/API-Server Push).
This commit is contained in:
Rongsong Shen 2026-07-15 17:27:34 +00:00
parent 9e0d87fe50
commit b7b90e9d21
5 changed files with 769 additions and 1 deletions

View file

@ -42,6 +42,20 @@ sched_job_array_test = executable('sched_job_array_test',
dependencies: [scheduler_test_deps],
install: false)
# Cross-daemon integration test (job-array-single-wal-record task 5.5): the
# REAL xce_encode()/xce_decode()/extract_data() -> scheduler_req_handler()
# chain (the top-level function vtask_entry() registers as its handler),
# proving one-push/N-tasks/log-once and redelivery-safety under genuinely
# re-decoded wire bytes -- one layer more real than sched_job_array_test's
# own wire-dispatch case, which stops at sched_handle_dataset(). Kept as its
# own binary for the same reason sched_job_array_test is separate from
# sched_handlers_test: it needs a REAL sched->jobs kvmgr for the dedup check.
sched_job_array_wire_e2e_test = executable('sched_job_array_wire_e2e_test',
['test_job_array_wire_e2e.c'],
include_directories:[incdir],
dependencies: [scheduler_test_deps],
install: false)
# Register as meson tests so `meson test --suite scheduler` runs them all.
# detect_leaks=0 matches the suite convention (fixtures are not torn down).
test('scheduler test', scheduler_test, suite: 'scheduler',
@ -52,3 +66,5 @@ test('scheduler handlers test', sched_handlers_test, suite: 'scheduler',
env: ['ASAN_OPTIONS=detect_leaks=0'])
test('scheduler job-array expand test', sched_job_array_test, suite: 'scheduler',
env: ['ASAN_OPTIONS=detect_leaks=0'])
test('scheduler job-array wire e2e test', sched_job_array_wire_e2e_test, suite: 'scheduler',
env: ['ASAN_OPTIONS=detect_leaks=0'])