test(node): Collapse mysql span streaming tests into same suite#21890
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d33a23f. Configure here.
| const CASES = [ | ||
| // OpenTelemetry default — no opt-in, no injection. (OTel does not support ESM.) | ||
| { label: 'opentelemetry (default)', instrument: 'instrument.mjs', flags: [], origin: undefined, failsOnEsm: true }, | ||
| { label: 'opentelemetry (default)', env: {}, flags: [], origin: undefined, failsOnEsm: true }, |
There was a problem hiding this comment.
Parent ORCHESTRION env enables opt-in
Medium Severity
Cases labeled OpenTelemetry default pass env: {} while the runner merges process.env into the child. Shared instrument.mjs enables diagnostics-channel injection when ORCHESTRION === 'true', so a parent-shell ORCHESTRION=true can turn on orchestrion for those cases. Their expectations omit sentry.origin, so the suite may pass without exercising OTel mysql instrumentation.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit d33a23f. Configure here.
There was a problem hiding this comment.
this is fine and should not happen
There was a problem hiding this comment.
Sounds reasonable to me. I agree that this streamlines the tests. The only thing that this makes a bit more annoying is that the -streamed suffix came in handy when I wanted to run span streaming tests. You could basically just run yarn test streamed and every span streaming suite ran. yarn test -t "streamed" works of course somewhat similar but is more annoying because it matches a broader set of tests and is slower. Not the end of the world though 😅


I recently updated the mysql tests to be a bit more streamlined, and I think somewhat in parallel we added mysql-streamed tests. this PR collapses these into a single test suite to make it a bit easier to reason about. it also makes sure to use the same minimal mock mysql server so we do not get all-error spans there.