Add Coverlet PR coverage reporting and cross-database boundary tests - #189
Merged
Merged
Conversation
Collect Coverlet Cobertura reports in all twelve existing test jobs and merge the eleven database suites plus Unit into an HTML coverage artifact. Show line and branch coverage in the PR check summary, comparing against a successful run on the exact target commit. Report missing or expired baselines explicitly instead of assuming zero coverage. Keep the workflow read-only and independent of external coverage services or new secrets. Add 75 live boundary cases per database across all eleven supported CI engines, plus 371 dialect and driver regression cases. Cover every MigratorDbType schema contract, supported integer ranges, decimal precision, floating-point values, bounded and large strings, fixed-length strings, binary payloads, NULL and empty values, date/time boundaries, defaults, nullability, and data preservation during column widening and renaming. Document native engine differences and remaining qualification gaps. Fix defects exposed by the new tests: - Preserve MySQL/MariaDB ANSI length 256 and maximum text capacity. - Honor MySQL/MariaDB decimal precision and scale and use DECIMAL for Currency. - Preserve four Currency fractional digits in new Oracle column mappings. - Use SQL Server VARBINARY(max) for binary capacities above 8000 bytes. - Correct Firebird variable/fixed string and bounded binary mappings and recognize OCTETS columns as binary in catalog metadata. - Bind Single and SByte values through the shared parameter implementation. - Bind PostgreSQL UInt64 as Decimal and reject SQLite UInt64 values that exceed signed INTEGER storage instead of permitting lossy conversion. Validation before commit: 823 combined Unit/SQLite tests and the additional PostgreSQL driver-binding regression passed (824 total); coverage-summary regressions and GitHub Actions lint passed. The local Unit/SQLite coverage run increased line coverage from 43.35% to 44.94% and branch coverage from 37.78% to 39.25%. Ten server engines still require CI validation because Docker is unavailable locally. Mapping changes affect generated DDL, not existing tables automatically; coverage deltas remain informational. Rebased onto current master before publication; all 843 locally executable Unit and SQLite tests passed again on the rebased commit.
Normalize duplicate VSTest coverage attachments and reject missing or conflicting reports. Merge only canonical per-job reports and cover normalization with regression tests. Correct PostgreSQL timestamp binding and character metadata, Oracle floating-point storage and character metadata, SQL Server precision and fixed-character metadata, Db2 byte parameters, and Informix large-text scalar reads. Render SQL NULL for null insert and update values to avoid untyped binary parameters. Exercise binary NULL updates through both overloads and document native Informix, Sybase, and Firebird boundary semantics. Validation: 855 Unit and SQLite tests passed; coverage script tests and actionlint passed.
Bind Single values as native Oracle BinaryFloat instead of decimal FLOAT and verify the actual ODP.NET parameter type. Use sequential Informix scalar reads so IsDBNull cannot populate the faulty generic TEXT cache before GetString. Assert Firebird's exact OverflowException when its driver rejects a scaled Int64 value outside the storage range. The boundary test still verifies the maximum accepted value and exact readback. Validation: 856 Unit and SQLite tests passed. The preceding full matrix passed Unit, SQLite, SQL Server, PostgreSQL, MySQL, MariaDB, Db2, Sybase, and HANA; this follow-up addresses the remaining Oracle, Informix, and Firebird failures.
Dispose provider-owned connections in the shared test teardown even when cleanup fails. Disable pooling for per-test Oracle users, whose unique connection pools otherwise accumulate dedicated server processes and trigger ORA-00020. Read Informix TEXT through bounded GetChars chunks while retaining the generic conversion for other types, including empty VARCHAR values. Keep exact large-text content assertions and all database tests enabled. Validation: 856 Unit and SQLite tests pass; live Oracle and Informix cases are verified by the full CI matrix.
Select the ANSI long-character parameter mapping beyond LVARCHAR capacity to match the dialect's TEXT storage. Remove the scalar-reader workaround because both typed and streamed reads reproduced the same corrupted stored suffix. Validation: 856 Unit and SQLite tests pass. Exact 70,005-character live round trips remain required in CI.
Record native Oracle float parameter binding, the Informix large-text transfer investigation, and deterministic connection disposal with pooling disabled for isolated Oracle users. Update local validation to 856 passing cases.
Emit bounded byte-suffix and parameter-mapping diagnostics only when the exact large-text round trip fails. Preserve the failing assertion while distinguishing native storage corruption from reader conversion.
Read string scalars through GetString without first calling IsDBNull, which eagerly caches the faulty generic TEXT conversion. Handle database NULL only after the typed getter reports an invalid cast. Non-string scalars retain the normal reader path. Byte-level CI diagnostics confirmed the complete suffix is stored correctly. Remove the unsuccessful parameter-binding workaround and temporary diagnostics. Validation: 856 local Unit and SQLite tests passed.
Bypass the native Unicode conversion that replaces the final TEXT character with NUL. Read raw bytes sequentially, verify complete retrieval, and decode using the database GL_CTYPE locale rather than guessing the client encoding. Cover Latin-1, UTF-8, Windows-1252, and invalid UTF-8 decoding. Add an accented character to the large-text suffix in all eleven database suites so encoding errors remain observable. Validation: 862 Unit and SQLite tests passed. Byte-level CI diagnostics proved that stored TEXT bytes were intact; all full-content assertions remain enabled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The test workflow previously verified test assignment but did not measure code coverage or report coverage changes in pull requests. Database tests also left gaps around type capacities, numeric boundaries, parameter binding, and data preservation during schema changes.
This PR adds Coverlet reporting and expands the existing database matrix, with fixes for defects exposed by the new tests.
Coverage reporting
Expanded tests
Provider fixes
These mapping changes affect generated DDL; existing tables are not altered automatically. SQLite UInt64 overflow now fails explicitly.
Validation
All changes are committed with detailed English messages. Temporary diagnostics and unsuccessful workarounds were removed; complete large-text assertions remain enabled, including an accented suffix.