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

Tilman Hausherr reopened TIKA-3759:
-----------------------------------

FSUtilTest fails on Windows because no exception is thrown. After looking at 
the 1.x branch, I believe that the original intention of that test was that it 
would throw at least one exception. Your change to use {{assertThrows}} no 
longer did the check at the end so the complete test failed. Here's my 
suggested code, please try if it works on linux.
{code}
    public void testSafeResolution() throws Exception {
        Path cwd = Paths.get(".");
        String windows = "C:/temp/file.txt";
        String linux = "/root/dir/file.txt";

        assertThrows(IllegalArgumentException.class, () -> {
            FSUtil.resolveRelative(cwd, windows);
            FSUtil.resolveRelative(cwd, linux);
        });
    }
{code}


> upgrade to junit 5 in tika-batch
> --------------------------------
>
>                 Key: TIKA-3759
>                 URL: https://issues.apache.org/jira/browse/TIKA-3759
>             Project: Tika
>          Issue Type: Sub-task
>            Reporter: Tim Allison
>            Priority: Trivial
>             Fix For: 2.4.1
>
>




--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to