Skip to content

Eliminate all test skips and CI test-subset exclusions (sqlite + HANA) #477

Description

@sjvans

Goal: the full test suite should run — and pass — on both sqlite and HANA, with no test.skip / xtest, no db-kind or version conditional early-returns, and no CI test-subset exclusion. The only sanctioned exception is SAP Passport, which is inherently HANA-only.

This is a cleanup umbrella. Some items are already in flight (see #467); the rest need work. Each skip below should either be made to run on both DBs, or — if genuinely impossible — carry a documented, reviewed reason (the bar: only SAP Passport qualifies today).

1. Queue-worker tracing skipped on sqlite (in progress via #467)

test.skip('queue-worker tracing needs cds.spawn on sqlite (pending cds fix)') in:

  • test/tracing-scheduled.test.js:37
  • test/tracing-outboxed-batch.test.js:19
  • test/tracing-messaging-inboxed.test.js:62
  • test/tracing-messaging-persistent-outbox.test.js:102

Root cause: @sap/cds used a raw setTimeout bypass (not cds.spawn) for the sqlite queue worker, so the cds.spawn - run task root span never appeared. #467 removes these skips, gated on the cds fix (test/queue-spawn-sqlite-extended-tenant: removes the bypass + wraps ExtendedModels.model4() in cds.tx()) shipping and @sap/cds being bumped. → close this sub-item when #467 merges.

2. cds < 9 version guards

if (... cds.version.split('.')[0] < 9) return/skip in:

  • test/tracing-scheduled.test.js:28, test/tracing-outboxed-batch.test.js:13
  • test/tracing-remote-cloudsdk.test.js:12, test/tracing-remote-native.test.js:16
  • test/tracing-attributes.test.js:45 (remote sub-test)
  • test/metrics-outbox.test.js:44 and test/metrics-outbox-multitenant.test.js:47 — these two are test.skip('skipping tests for cds version < 9') (land via test: capture outbox+console metrics via in-memory reader & unit-test ConsoleMetricExporter #479). Remove the guard so the suites always run.

The repo's peer dep is now @sap/cds ^10 || ^9 and CI only tests 9 & 10 — every < 9 guard is dead code (the condition can never be true). Remove them all outright.

3. Unimplemented test.skip stubs (write the tests)

  • test/tracing.test.js:114 individual handlers · :116 remote
  • test/tracing-mt.test.js:42,44,46,48,50$batch, individual handlers, srv.emit, cds.spawn, remote (all in the multitenancy context)

These are placeholders. Either implement them (preferred — they're real coverage gaps) or drop them if redundant with existing non-MT coverage.

4. xtest — jest/http-instrumentation artifacts

  • test/tracing.test.js:31 "GET with traceparent is traced" · :55 "instrumentation hooks"

Skipped because jest broke OTel's require-in-the-middle http patching. The jest→vitest migration (#474) changes this — vitest uses real require, so http instrumentation actually works. Re-enable these under vitest and assert on the real incoming spans. Overlaps with #475 (enable HTTP instrumentation in tests). → fold into #475 or do here once #474 lands.

5. CI HANA test-subset exclusion

jest.config.js (and the vitest config in #474) restrict HANA CI to only tracing-attributes.test.js + passport.test.js:

config.testMatch = ['**/tracing-attributes.test.js', '**/passport.test.js']

The intent (per this issue) is that the whole suite runs on HANA, not a 2-file subset. Remove the subset restriction so HANA CI exercises every test (raising the timeout as needed). Any test that legitimately can't run on HANA must be justified inline — again, only SAP Passport is expected to be sqlite-vs-HANA-specific, and it runs on HANA (it's skipped on sqlite, which is the one allowed exception).

The one allowed exception

  • test/passport.test.js:12if (db.kind === 'sqlite') return test.skip('n/a for SQLite'). SAP Passport is a HANA session-context feature; there is no sqlite equivalent. This skip stays.

Definition of done

  • npm run test on sqlite: 0 skipped (except passport).
  • HANA CI: full suite runs (no testMatch subset), 0 skipped except passport.
  • No cds.version < 9 guards; no xtest; no unimplemented test.skip stubs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions