Repository navigation
test: raise line coverage - #25
Merged
Merged
Conversation
… the harness Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
A custom HeapInterface can iterate an entity it holds no node for. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
The acceptance test now follows the documented flow, new-case then a regression suite from Config, so every driver suite runs both and Codecov no longer counts their lines from static analysis. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 1.x #25 +/- ##
==========================================
+ Coverage 98.64% 99.51% +0.87%
==========================================
Files 43 43
Lines 1030 1025 -5
==========================================
+ Hits 1016 1020 +4
+ Misses 14 5 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What was changed
Command(new-case) and run from a regression suite built withConfig, the documented user flow, on every driver.OrmPluginwithout a database plugin leaves tests alone;HeapIntegrityreports a heap entity that has no node (a customHeapInterface).Why?
Line coverage: Codecov 98.64% → 99.51% (14 → 5 missed lines, the five listed below).
ConfigandCommandrun only in the Unit suite, so every driver flag reported some of their lines (constructor signatures, inner lines of multi-line calls) from static analysis, and Codecov counted them as missed. Locally with pcov on PHP 8.5, Unit + SQLite merged the way Codecov does: 1060/1086 → 1064/1081, with the Purger lines below covered by the server suites in CI.Checklist
composer test:unitandcomposer test:sqlitepass locally; the server suites run in CI onlyReview notes
Left uncovered, with the reason:
Purger62-64 and 99-111: MySQL and SQL Server only;Feature/Common/PurgerTestcovers them in CI.Env::drivers()105-106, the deprecatedDBvariable: tested in a child process, because the notice goes to the real STDERR, which Infection's run of the suite does not tolerate; the child's coverage is not collected.ContextInjectingInstance::hasInstance()38: onlytesto/benchcalls it, andDatabaseInterceptorwraps the instance oftestcases only, so no suite reaches it.Isolate15 andFakePDOStatement25, constructor signatures: pcov artefacts. Both classes are executed only in the Unit suite (the attribute is instantiated by the harness outside a test's coverage window), so the driver flags report the line from static analysis, which pcov never reports for executed code.Bug,
srcleft alone:QueryLog::log()skips a message withempty($context['elapsed']), and the driver'selapsedismicrotime(true) - $queryStart, which is0.0when a query finishes within the clock's resolution. Such a query is not counted, soassertNumReads()andassertNumWrites()flake: the first CI run of this PR failedQueryCountersTest::countsSinceTheCapture(nested inHarnessTest::featureSuitePassesOnSqlite, PHP 8.2) with "expected 1 got 0" reads, and passed on rerun. Checkingisset()/array_key_exists()instead ofempty()fixes it.