Clean up Open Knowledge test scratch directories (#5562) - #1976
Merged
Merged
Conversation
* [wip] claim work on test scratch directory cleanup * fix: clean up Open Knowledge test scratch directories * fix: close fixture cleanup gaps on skipped and failing tests * test: cover script harness cleanup when construction fails * test: target the harness disposer in cleanup failure coverage * fix: contain installer staging and clean up failed harness setup * test: exercise real fixture removal failure * test: register the harness lifecycle suite and temp-dir helper in the lume-qa rot tier The rot-tier census and harness-trigger checks failed because the new lifecycle suite was neither rostered nor declared, and the shared temp-dir helper it imports was missing from the harness trigger list. * test: give createTempDirFactory the same name-prefix contract as withTempDir makeTempDir now creates its directory under the system temp dir from a bare name prefix, so a caller can no longer allocate a scratch directory relative to the working directory by passing the prefix it would give withTempDir. Callers drop their join(tmpdir(), ...) wrappers. * test: require registered temp-dir cleanup to report every removal failure Two of three registered removals fail with EACCES; the cleanup must report both failures and finish the remaining removal before it settles. Fails on the current helper, which settles on the first rejection. * fix: settle registered temp-dir cleanup only after every removal finishes The cleanup awaited Promise.all, so it settled on the first rm rejection, left later removals running and dropped their failures. It now waits for every removal, rethrows a single failure unchanged and raises an AggregateError when more than one removal fails. * test: require registered temp-dir cleanup to report a lone removal failure The only failing-cleanup test locked two parents, so it reached the AggregateError branch and never the single-failure rethrow. Deleting that rethrow left the file green while a lone failed removal resolved cleanup silently, because the remaining branch fires only for two or more failures. The new test locks one parent and expects the original EACCES error for the locked path; it fails both when the rethrow is deleted and when a lone failure is wrapped in an AggregateError. GitOrigin-RevId: a3f0e5ac6458ded971172c9cb2dcfc4cd8e77635
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.
Copybara-translated 1 Inkeep OSS change. Rebase-merge this PR so the prepared commit lands directly on public main.