You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 sanctioned exceptions are documented at the bottom: SAP Passport (sqlite-skip, HANA-only feature) and multitenancy on HANA (HANA-skip, needs a bound Service Manager the CI lacks).
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:
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:
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-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:
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).
Sanctioned exceptions (documented + reviewed)
test/passport.test.js:12 — if (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 (skipped on sqlite, runs on HANA).
Multitenancy on HANA — test/tracing-mt.test.js and the multitenant describe in test/metrics-outbox-multitenant.test.js skip when db.kind === 'hana' (added in test: run full suite on HANA + fix two HANA span/metric bugs (#477 §2, §5) #481). MTX tenant subscription needs a bound BTP Service Manager, which the CI's single pre-provisioned HDI container does not provide (No Service Manager credentials). These skips stay on HANA (they run fully on sqlite) until the HANA CI setup gains a bound Service Manager. This is the inverse of passport: passport is sqlite-skip/HANA-run; multitenancy is HANA-skip/sqlite-run.
Definition of done
npm run test on sqlite: 0 skipped except passport (the sqlite-only exception).
HANA CI: full suite runs (no testMatch subset), 0 skipped except the multitenancy tests (the HANA-only exception above).
No cds.version < 9 guards; no xtest; no unimplemented test.skip stubs.
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 sanctioned exceptions are documented at the bottom: SAP Passport (sqlite-skip, HANA-only feature) and multitenancy on HANA (HANA-skip, needs a bound Service Manager the CI lacks).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:37test/tracing-outboxed-batch.test.js:19test/tracing-messaging-inboxed.test.js:62test/tracing-messaging-persistent-outbox.test.js:102Root cause:
@sap/cdsused a rawsetTimeoutbypass (notcds.spawn) for the sqlite queue worker, so thecds.spawn - run taskroot span never appeared. #467 removes these skips, gated on the cds fix (test/queue-spawn-sqlite-extended-tenant: removes the bypass + wrapsExtendedModels.model4()incds.tx()) shipping and@sap/cdsbeing bumped. → close this sub-item when #467 merges.2.
cds < 9version guardsif (... cds.version.split('.')[0] < 9) return/skipin:test/tracing-scheduled.test.js:28,test/tracing-outboxed-batch.test.js:13test/tracing-remote-cloudsdk.test.js:12,test/tracing-remote-native.test.js:16test/tracing-attributes.test.js:45(remote sub-test)test/metrics-outbox.test.js:44andtest/metrics-outbox-multitenant.test.js:47— these two aretest.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 || ^9and CI only tests 9 & 10 — every< 9guard is dead code (the condition can never be true). Remove them all outright.3. Unimplemented
test.skipstubs (write the tests)test/tracing.test.js:114individual handlers ·:116remotetest/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 artifactstest/tracing.test.js:31"GET with traceparent is traced" ·:55"instrumentation hooks"Skipped because jest broke OTel's
require-in-the-middlehttp patching. The jest→vitest migration (#474) changes this — vitest uses realrequire, 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 onlytracing-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).
Sanctioned exceptions (documented + reviewed)
test/passport.test.js:12—if (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 (skipped on sqlite, runs on HANA).test/tracing-mt.test.jsand the multitenant describe intest/metrics-outbox-multitenant.test.jsskip whendb.kind === 'hana'(added in test: run full suite on HANA + fix two HANA span/metric bugs (#477 §2, §5) #481). MTX tenant subscription needs a bound BTP Service Manager, which the CI's single pre-provisioned HDI container does not provide (No Service Manager credentials). These skips stay on HANA (they run fully on sqlite) until the HANA CI setup gains a bound Service Manager. This is the inverse of passport: passport is sqlite-skip/HANA-run; multitenancy is HANA-skip/sqlite-run.Definition of done
npm run teston sqlite: 0 skipped except passport (the sqlite-only exception).testMatchsubset), 0 skipped except the multitenancy tests (the HANA-only exception above).cds.version < 9guards; noxtest; no unimplementedtest.skipstubs.