rusackas opened a new pull request, #44908: URL: https://github.com/apache/superset/pull/44908
### SUMMARY apache/superset#44704 added `OracleEngineSpec.get_cancel_query_id`/`cancel_query` for SQL Lab query cancellation, verified only by hand against a real Oracle instance during development (per that PR's own testing notes) — it never got a repeatable test. This adds one: identify the session about to run a long statement on one connection, cancel it from a second connection mid-flight (mirroring SQL Lab's own "new cursor to the db of the query" cancel path), and confirm the first connection's statement actually fails with `ORA-01013` well before it would complete on its own — not just that `cancel_query` returned `True` without effect. Two false starts along the way, documented in code comments for the next person: a `CONNECT BY LEVEL <= n` row generator hits `ORA-30009` (out of memory) before the cancel lands — wrong failure, wrong reason. A no-op `NULL;` loop body gets silently optimized away regardless of iteration count, so the statement returns instantly with nothing to cancel. Settled on a PL/SQL loop with a real loop-carried counter, empirically timed against this same image at 500M iterations ≈ 8s — safe margin over the test's 1.5s pre-cancel delay. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A — test-only change. ### TESTING INSTRUCTIONS Verified locally against a real Oracle testcontainer, run twice: `pytest tests/testcontainers/db_engine_specs/test_oracle.py -m testcontainers -v` — 3 passed both times (the two pre-existing tests plus this one), ~14s total per run. CI's `Testcontainers` workflow will run it against a fresh container on this PR. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
