[ 
https://issues.apache.org/jira/browse/IO-858?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sebb resolved IO-858.
---------------------
    Resolution: Fixed

Fixed by 

aa43f4f9f31a49d06a6860d6b6569ec751a6d707

and

ab165f7b7f24074faccb2e54feba617e9fc21f15

> FileUtilsWaitForTest does not test anything useful
> --------------------------------------------------
>
>                 Key: IO-858
>                 URL: https://issues.apache.org/jira/browse/IO-858
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Major
>
> 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.
>  
> [1] 
> https://github.com/apache/commons-io/blob/master/src/test/java/org/apache/commons/io/FileUtilsWaitForTest.java



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to