pub async fn assert_write_modes_truthful<S, F, Fut>(sink: &S, distinct_count: F)Expand description
Check 7. Assert a sink advertising Upsert/Delete in
supported_write_modes genuinely upholds
those modes:
- Upsert — re-writing a record with an existing key converges to one row (last-write-wins), it does not append a duplicate.
- Delete — a record carrying the standard delete marker
(
DELETE_MARKER_FIELD=DELETE_MARKER_VALUE, matching thecdc_unwrapconvention) removes its keyed row. Only run when the sink advertisesDelete; the sink under test must be configured with a matchingdelete_marker. - Missing/null key —
plan_writes, the shared planner every upsert sink routes through, reports such rows asfailed(destined for a DLQ) rather than writing them.
Records are keyed on "id", so the sink under test must be configured
write_mode: upsert with key: ["id"]. A sink advertising only Append
has nothing to prove and the body is skipped. distinct_count reports the
destination’s current distinct-row count.