Conversation
Cover execute_ddl buffering, empty DDL, progress TTY, async/sync fake-admin LROs, and EXPLAIN/DESCRIBE/ANALYZE query execution plus plan-export edge cases without changing production code. Co-authored-by: apstndb <apstndb@users.noreply.github.com>
Co-authored-by: apstndb <apstndb@users.noreply.github.com>
Cancel the wait-loop test only after the fake accepts UpdateDatabaseDdl and the first GetOperation poll, using a 30s timeout as a deadlock guard instead of a 200ms deadline on the initial admin RPC. Assert both InvalidArgument and the injected poll error message. No production or coverage-policy changes. Refs #941. Co-authored-by: apstndb <apstndb@users.noreply.github.com>
After the fake accepts UpdateDatabaseDdl and serves the first GetOperation, wait briefly so executeDdlStatements leaves op.Poll and blocks in the wait-loop select. Canceling at poll-handler return was racing the in-flight Poll and skipping the ctx.Done branch. No production or coverage-policy changes. Refs #941. Co-authored-by: apstndb <apstndb@users.noreply.github.com>
Co-authored-by: apstndb <apstndb@users.noreply.github.com>
Code Metrics Report📊 View detailed coverage report (available for 7 days)
Details | | main (873d8ee) | #947 (707fa3e) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 85.1% | 85.8% | +0.7% |
| Files | 105 | 105 | 0 |
| Lines | 9223 | 9223 | 0 |
+ | Covered | 7853 | 7920 | +67 |
+ | Code to Test Ratio | 1:2.1 | 1:2.1 | +0.0 |
| Code | 20926 | 20926 | 0 |
+ | Test | 43998 | 44846 | +848 |
| Test Execution Time | 1m38s | 1m38s | 0s |Code coverage of files in pull request scope (73.0% → 82.4%)
Reported by octocov |
Co-authored-by: apstndb <apstndb@users.noreply.github.com>
Co-authored-by: apstndb <apstndb@users.noreply.github.com>
|
Reviewed P2, source-backed: The merged test already verifies cancellation after operation acceptance with explicit synchronization. Please do not add a delay solely to raise coverage of a particular select arm. Keep this follow-up draft and pause implementation while the integrated #941 result is verified; if the target is reached, retain this as a deferred candidate rather than creating additional coverage work. A future proposal should use a deterministic existing observation point or focus on the externally observable cancellation contract. |
Refs #941. Follow-up to #943.
Summary
Test-only change in
internal/mycli/execute_ddl_rpc_test.go. After the fake acceptsUpdateDatabaseDdland serves the firstGetOperation, the wait-loop test waits untilexecuteDdlStatementshas leftop.Polland blocked in the wait-loop select before canceling. Canceling at handler return was racing the in-flight poll and skipping the wait-loopctx.Done()branch.No production code changes.
.octocov.ymlremainsacceptable: 80%.HEAD
27ba1b6c5e87b44824a1df21bc6064ab38515feaincludes additive merges oforigin/mainthrough #944 (a54dbdfe34b581679cb42b84af4b5abfb6d6b0f9). Exclusive file vs main remainsexecute_ddl_rpc_test.go.Hosted coverage (pre-#944 merge head)
bb0ce44e4a1876891c1d7e37ea5ba1f1657e5cactest(103585083339)run tests with coverage(make test-coverage)go tool cover -functotal: 84.8%coverage-reportid103013296048fe38b37a47942c9063b89dedba90c0f8a39ec10: 85.1% vs then-main873d8ee85.1% (+0.0%, +3 covered, 7853 → 7856 / 9223)execute_ddl.go80.7% (+2.6%; restores the 78.0% wait-loop miss on merged Test DDL execution and EXPLAIN/DESCRIBE paths #943)Hosted CI/octocov for current HEAD
27ba1b6(after additive #944 merge) is pending.Remaining gaps in this lane
executeDdlStatementsticker / second poll (5s ticker; no production seam)executeExplainAnalyzeDMLremainderwritePlanExportFileremaining I/O error branchesExplainAnalyzeDmlStatement.isMutationStatementmarker method