Repository navigation
api tests: wait for the background work two tests race under load - #113
Merged
Merged
Conversation
…he row TestSettings_AutoDeleteOldSnapshots_SweepsWhenSwitchedOn waited until the old snapshot's row was gone, then looked once for its archive. The sweep (PruneOlderThan) deletes the rows first and the archives only after its last row, so under load the archive was still there: "the deleted snapshot's archive is still on disk". With a 300 ms pause put before the archives are dropped, the old test fails 3/3 and this one passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adding a save location starts its watch and first read in the background (RewatchGame). The test removed the folder straight away, and on Windows under load that failed: "The process cannot access the file because it is being used by another process" - the test racing the app, as testutil.RemoveTree says of the same race in the e2e tests. Retried for up to five seconds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@ChakraFusion is attempting to deploy a commit to the sivadaboi's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Two
internal/apitests failed on my slower machine under load. Both have a cause in the test, not the app:TestSettings_AutoDeleteOldSnapshots_SweepsWhenSwitchedOnwaited until the old snapshot's row was gone, then looked once for its archive. The sweep (PruneOlderThan) deletes the rows first and drops the archives only after its last row, so the archive could still be there ("the deleted snapshot's archive is still on disk"). It now waits for the archive too. With a 300 ms pause put before the archives are dropped, the old test fails 3 of 3 and the new one passes. This is the test I mentioned in Fixes and improvements from running 2.4.1 on 4 PCs with large saves — how would you like them? #21 as failing intermittently under load since v2.4.1.TestSaveFiles_MissingLocationDoesNotBreakTheListingadds a save location, which starts its watch and first read in the background (RewatchGame), then removes the folder straight away. On Windows that failed with "The process cannot access the file because it is being used by another process". It now retries the removal for up to five seconds, astestutil.RemoveTreedoes for the same race in the e2e tests.Checks: the full unit and e2e suites pass locally on today's
dev-public.🤖 Generated with Claude Code