Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[7.1.1] Also inject a failure for createWritableDirectory when testin…
…g that ActionOutputDirectoryHelper propagates exceptions. (#21683) Failure to do causes a flaky test failure when simulating an IOException while the `knownDirectories` cache is disabled. The reason is that `ActionOutputDirectoryHelper#forceCreateDirectoryAndParents` calls either `createDirectory` or `createWritableDirectory`, depending on whether the parent directory is in the cache or not. However, "disabling" the cache sets its size to zero, which doesn't prevent insertion; rather, it causes inserted entries to be almost immediately deleted by a background thread. Thus, if only one of `createDirectory` and `createWritableDirectory` throws, the test outcome depends on how fast the background thread runs. (We could make the zero-sized cache an actual no-op, but it's unlikely that anyone would want to set it to zero outside of test code, so it's not worth the trouble.) Fixes #21471. Commit f924338 PiperOrigin-RevId: 615513608 Change-Id: Id2247596c6af0e5d5142072de8309227a1d1cbd1 Co-authored-by: Googler <[email protected]>
- Loading branch information