Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
None
Description
AFAICT, FileUtilsWaitForTest [1] does not do anything useful currently.
Of the 3 tests, 2 don't check the return status, nor do they appear to be trying to test for Exceptions.
The 3rd test - testWaitForInterrupted - appears to be testing the response of FileUtils.waitFor() to an interruption. However it does not do so, as the waitFor() target is FileUtils.current() which is certain to exist. As it stands, AFAICT the test checks if the main thread can interrupt the test thread before it sets the wasInterrupted flag. This currently relies on relative thread timings, so it is not surprising that the test is flaky.
There should ideally be a test for IO-488, as well as tests for targets that are present or missing or which appear during a wait.