Repository navigation
Tests: the four censuses #3762 woke and merged past - straggler site count, live-teardown ratchet, credential-builder count (#3752 follow-up) - #3768
Merged
Conversation
- StragglerCommandTimeoutTests: DarlingCliCommands.cs now holds FOUR CLI store-command sites, not
three - the schedule read-back is the fourth and shares the CliStoreReadSeconds budget. The census
exists to make a person say so; said (3 -> 4, prose thirteen -> fourteen). The read-back site is
rewritten in the initializer-on-construction shape every other site in the file uses, so the
one-statement-window variant certifies it too.
- LiveCleanupConversionRatchetTests: the live end-to-end moves to its own file
(DarlingCollectorToggleVerbLivePostgresTests.cs) - applying [Collection("live-postgres")] inside
DarlingCliCommandsTests.cs pulled that whole file's 29 file-teardown finally blocks into the #1902
ratchet. Its teardown now runs through LiveStoreCleanup.RunAsync on its own connection with
bodySucceeded set last in the try, the shape the ratchet accepts.
- DarlingMissingCredentialMessageTests: the shared MissingStoreCredentialMessage builder has a sixth
caller (5 -> 6), which is the growth that pin is designed to record.
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 this is
#3762 (the
--enable-collector/--disable-collectorverbs, #3752) merged todevat 17:48Z, three minutes after it opened and before its first CI run finished. That run compiled clean and then woke exactly four censuses — structural pins that count sites and ask a person to confirm a new one belongs — and answered none of them, because the merge landed first.dev'sbuildandDarling PostgreSQL testsjobs are red on those four until this lands. No product behavior changes here; one command site is rewritten in a shape the census can certify, at the same deadline.The four, and each answer
StragglerCommandTimeoutTests.EveryStragglerCommand_SetsAnExplicitDeadline(regime: 2)andEveryStragglerSite_AlsoPassesTheSharedDeadlineScanner(regime: 2)— expected 3 command sites inDarlingCliCommands.cs, found 4. The fourth is the verb's schedule read-back (ReadCollectorScheduleRowsAsync), and it already carriedServiceCommandDeadlines.CliStoreReadSeconds— the relational check listed no offender, only the count moved. The census's own doc says what a count move means: "a fourth site added to any of these files fails on the count and asks a person whether it shares the budget." It does — a CLI store read on the CLI store-read deadline — so the row becomes("DarlingCliCommands.cs", Hop.Store, 4, …)and the prose's "thirteen sites" becomes fourteen. This is the one file outside [BUG] No headless way to enable a collector: long_query_completions ships opt-in but only the WPF Viewer can opt in #3752's named fence, and it is the edit that file exists to receive.The site itself is rewritten from
postgres.CreateCommand(sql); command.CommandTimeout = …;to the shape every other site in the file uses —new NpgsqlCommand(sql, connection) { CommandTimeout = ServiceCommandDeadlines.CliStoreReadSeconds }on an explicitly opened connection — because once the census expects four,NoDeadlineInScope_IsBorrowedFromANeighbouringConstructionre-runs the scan with a ONE-statement window and would not have seen a deadline assigned on the following statement. Same constant, same value; a comment at the site says why the shape matters.LiveCleanupConversionRatchetTests.NoLiveTestCleansUpOnItsOwnBodysConnection— "29 live-test teardown(s) do not go through LiveStoreCleanup". The ratchet scans every FILE that applies[Collection("live-postgres")], and CLI: --enable-collector / --disable-collector - the one opt-in collector had no headless opt-in; two verbs that run the executor's own plan (#3752) #3762 put its one live class insideDarlingCliCommandsTests.cs, whose twenty-nine pre-existingfinallyblocks (temp-folder teardown for the network-wizard and viewer-export pins) had never been in scope and were now all reported. The collection's hygiene test prescribes the fix in its own failure text — "If the class is mostly pure with one live test, prefer SPLITTING the live test into its own...LivePostgresTestsclass" — so the live class moves toDarlingCollectorToggleVerbLivePostgresTests.cs, and its teardown becomesLiveStoreCleanup.RunAsync(connectionString, bodySucceeded, CleanupAsync)withbodySucceeded = trueas the last statement of the try: the The other ~124 live-test finally blocks still clean up on the body's connection, so a failing test can still report its teardown's error #1902 shape, on its own connection, so a body failure that closed the test's connection cannot become a throw-from-finally that replaces the real exception. The three usings only the live class needed leave the pure file with it. Test content is otherwise unchanged (fleet enable in the wrong case → one canonical row; per-server enable by display name preservesfrequency_minutes = 5; fleet disable leaves the per-server row; unknown--serverrefused with nothing written).DarlingMissingCredentialMessageTests.NoVerbStillCarriesItsOwnFirstRunAdvice— expected 5 callers ofDarlingStoreBootstrapEvidence.MissingStoreCredentialMessage(, found 6. Its comment: "the count grows with each new store verb, and growing it is the point — a verb that grew its OWN copy of the advice instead would fail the two DoesNotContain assertions above." The verb went through the shared builder, so 5 → 6, with the comment naming which verb became the sixth.What it does NOT do
DarlingCliCommands.cs), at the same deadline constant.Verified
Cherry-picked onto
devatc1816f606(three merges after #3762) and re-run on this Mac through aDarling.Tests-named net10.0 harness inside the worktree:StragglerCommandTimeoutTests,LiveCleanupConversionRatchetTests,DarlingMissingCredentialMessageTestsall green, alongsideDarlingCollectorToggleVerbTests(32/32),DarlingStartupArgsTests,DarlingCliCommandsTests,DocCommentHygieneTests,LivePostgresCollectionHygieneTests,StoreSqlClockDisciplineTests,FleetIdentifierScrubTests— 267 green, the live class skipping here (no local store). Service builds-c Release -p:EnableWindowsTargeting=truewith 0 warnings.Follow-up to #3762; #3752 is already closed by that merge.