Repository navigation
fix(tests): wait on real signals in three flaky channel, headless, and SQLite recovery tests - #2790
Merged
Merged
Conversation
| var id = new SessionId("park/sqlite"); | ||
| await SqlPersistencePlugins.StartOneAtATimeAsync(this, ColdRecoveryCeiling); | ||
| await SqlPersistencePlugins.StartOneAtATimeAsync(this, ColdRecoveryCeiling, | ||
| Path.Combine(_sqliteDirectory!.Path, "journal.db")); |
Comment on lines
+104
to
+106
| => Path.Combine( | ||
| _sqliteDirectory?.Path ?? throw new InvalidOperationException("The test SQLite directory was not configured."), | ||
| "journal.db"); |
…d SQLite recovery tests ChannelBotFilterOrderTests: wait on the reason tag, not on the snapshot total. The total changes before the meter listener records the reason. HeadlessStopRuleMutationTests: wait in two phases. A 30 s cold start phase ends when the fake transport sees SendMessage. The 10 s stop ceiling then starts. A timeout names its phase. LegacyCoordinationSqliteRecoveryTests: give the three SendUserMessage asks the cold recovery ceiling. The ack waits behind durable SQLite writes. RecordedJournalTestBase and ChildParkSqliteRecoveryTests: wait for the actor system to stop before the pool clear and the delete. Clear the pools on each delete attempt. A plugin start timeout now names the plugin and the database.
Aaronontheweb
force-pushed
the
fix/flaky-channel-headless-sqlite-tests
branch
from
November 5, 2026 23:51
bca64da to
cd52875
Compare
…t Slopwatch reads The inline slopwatch-ignore comment did not suppress the rule, so the Slopwatch check failed.
Comment on lines
+343
to
+345
| catch (IOException) when (attempt < DeleteAttempts) | ||
| { | ||
| } |
Merged
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.
Summary
This PR fixes three flaky tests. Each test waited on a signal that did not prove the data it then read.
Earlier PRs fixed parts of tests 2 and 3. #2612 and #2625 fixed an earlier part of each. This PR fixes the parts that remained.
1. ChannelBotFilterOrderTests (macOS)
Slack_person_denied_by_ACL_is_droppedfailed twice in a row withExpected ["user_not_allowed"], Actual [].ChannelMetrics.RecordEventDroppedfirst increments the snapshot total. It then calls_eventsDropped.Add, which runs the meter listener that records the reason. The test waited on the total and read the reasons once. It could read between the two lines.RecordEventFilteredhas the same order.AwaitAssertAsync. The negative checks run after that wait.ChannelMetricsis unchanged.Thread.Sleep(300)between the two lines inChannelMetrics, the old test failed 6 of 6 with the CI error. The new test passed 6 of 6. The temporary change is removed.2. HeadlessStopRuleMutationTests (Windows)
StopCeiling.ConnectAsyncout of the ceiling. Other cold work stayed inside it. This work includes the session create RPC, the first log file open, the first send, and the output pump. On a loaded Windows runnerConnectAsyncalone took about 11 s.TaskCompletionSourcecompletes when the fake transport seesSendMessage. The test waits on it for up to 30 s. Then the existing 10 s stop ceiling starts. Each timeout names its phase. The stop ceiling stays short, because Stryker pays it in full for each mutant that never stops../scripts/run-headless-stop-rule-mutations.shpassed. It tested 3 mutants and killed 3, as expected. The expected count is unchanged.Netclaw.Cli.MutationTestsproject passed.3. LegacyCoordinationSqliteRecoveryTests (Windows)
AskforSendUserMessagetimed out.SendUserMessageasks now use the existingColdRecoveryCeiling. No production command is added.StartOneAtATimeAsyncwaited 30 s for the journalRecoverySuccess. ThenDeleteOwnedDirectoriesfailed withIOException: journal.db in use.RecordedJournalTestBaseandChildParkSqliteRecoveryTests:DisposableTempDirretries between them.StartOneAtATimeAsynctakes the database path as a required parameter.Checks
dotnet test src/Netclaw.Actors.Tests: 7281 passed, 41 skipped, 0 failed.TestKitTeardownGuardtests: 5 passed.dotnet slopwatch analyze: 0 issues.Add-FileHeaders.ps1 -Verifydid not run, because the sandbox blockedpwsh. This PR adds no .cs file, so no header changed.