Repository navigation
Run converted legacy cases through the operator case runner - #4544
Open
evanchooly wants to merge 1 commit into
Open
evanchooly wants to merge 1 commit into
evanchooly wants to merge 1 commit into
Conversation
A legacy testPipeline case whose fixture directory holds a scenario.json runs its unchanged lambda through OperatorCaseRunner, after its options are checked against the scenario. FormMainKt convert replaces a case's legacy fixture files with the scenario written from its accepted override, and the migration ledger keeps the legacy method, its hash-checked body text and the result order derived from it. Scenarios carry the documented example title, which each case's @DisplayName must equal. trunc/truncExpressionOperator is the first converted case.
This branch has not been deployed
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.
Stacked on #4543 (step 5, slice 3 of the test generation design).
Problem
The runner from #4542 only ran tests written in its own form, and moving a legacy body into that form (as
$roundwas) doesn't scale to 556 cases. Legacy cases need to join the runner with their bodies untouched, so that they gain the strict comparison and the reference-driver behavior check without regenerating reviewed code. The plan calls this the compatibility adapter.Change
Core.
TemplatedTestBase.testPipelinechecks whether the case's fixture directory holds ascenario.json. If it does, it hands the test's unchanged lambda toOperatorCaseRunner.ActionTestOptionsmust say what the scenario says: result order, noremoveIdsor skip options, no version requirements. A mismatch fails the test, since the scenario now drives the run.testQueryandtestUpdaterefuse a converted fixture until they're supported.OperatorCaseaccepts scenarios in legacy fixture directories.GeneratedCasesknows theCONVERTEDkind, walks legacy fixture directories for unlisted scenarios, and checks every case's@DisplayNameagainst the scenario's documentedtitle. That title replaces the deletednamefile.Audits.
FormMainKt convert <root> <revision> <fixture>replaces a case's legacy files with the scenario written from its accepted, exact override. OnlytestPipelinecases are accepted, with no options beyondorderMatters.CONVERTED, the legacy method, which stays, and the legacy body text, checked against the frozen catalog's digest. The result order is re-derived from the body text.$round's entry gains its body text from Git history, which closes the item deferred in Add the operator case runner and move $round onto it #4542.FixtureMigration.retiredLocks, shared byRepairsMainand its test, keeps a converted case's retired lock classifying it in the inventory.First converted case.
trunc/truncExpressionOperatorpasses all three checks under both mappers with its body unchanged; its legacy files are gone.Decisions for review
Scope. The adapter covers aggregation cases whose reference is an accepted, exact override. These come with the cutover slice instead, where every case's reference is decided:
CURATED_REFERENCEandSOURCE_REMOVED;Until then they're refused rather than half-supported.
Ordering detection. The result order is detected from a literal
.orderMatters(false)in the body. That fails closed:convertcross-checks the inventory's options, and the runner checks the real options at run time.Verification