-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve handling concurrent workspace changes when storing file (#103)
The FileSystemResourceManager.write method fails when concurrently modifying the target file in the workspace with different kinds of exceptions depending on the point in time at which the file is removed. This can, e.g., be the case due to a concurrently running workspace refresh, which removes the file while write() is executed. The FileSystemResourceManagerTest.testWriteFile randomly fails because of this behavior. A concurrently running refresh removes the file at any point in time during execution of write(). - Clarify that write() expects existance of target file not only when calling the method but also during execution in its documentation - Make write() check existance of the target file whenever it is accessed to detect concurrent modifications and deterministically fail with an IllegalStateException - Make testWriteFile() wait for the refresh to be finished before executing write() to have deterministic test behavior - Add additional test case validating proper failure of write() when target file is concurrently removed
- Loading branch information
1 parent
b85b3cd
commit 41932f2
Showing
2 changed files
with
113 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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