cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.16k stars 3.82k forks source link

cdc, jobs: better tests for SHOW [jobtype] JOBS output #100599

Open HonoreDB opened 1 year ago

HonoreDB commented 1 year ago

We recently had a bug that introduced duplicates into SHOW JOBS and SHOW type JOBS, among other problems, and no tests appeared to fail from the duplicates alone. We should have tests (maybe logic tests?) making stricter assertions about these queries.

Jira issue: CRDB-26516

Epic CRDB-25040

blathers-crl[bot] commented 1 year ago

cc @cockroachdb/cdc

amruss commented 1 year ago

Test: I created one job.. insert 5 or 6 job info records... assert/expect only one job comes up when we do show jobs. Do it all with a fake resumer. Testjobtypemetrics (jay added recently) is a good template for this.