You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Konstantin Orlov (Jira)" <ji...@apache.org> on 2021/10/22 08:18:00 UTC

[jira] [Commented] (IGNITE-15799) WorkDirectoryExtension can fail if all tests in a class are muted

    [ https://issues.apache.org/jira/browse/IGNITE-15799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17432862#comment-17432862 ] 

Konstantin Orlov commented on IGNITE-15799:
-------------------------------------------

Hi, [~apolovtcev]! I've left a comment. Please, see PR.

> WorkDirectoryExtension can fail if all tests in a class are muted
> -----------------------------------------------------------------
>
>                 Key: IGNITE-15799
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15799
>             Project: Ignite
>          Issue Type: Task
>            Reporter: Aleksandr Polovtcev
>            Assignee: Aleksandr Polovtcev
>            Priority: Minor
>              Labels: ignite-3
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> If a test class declares a field marked with the {{WorkDirectory}} annotation and all of its test methods are marked as {{Disabled}}, then JUnit does not instantiate the test class instance. However, theĀ {{BeforeAll}} andĀ {{AfterAll}} callbacks are still run, so the following error may appear:
> {code:java}
> java.nio.file.NoSuchFileException: target/work	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
> 	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
> 	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
> 	at java.base/sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:412)
> 	at java.base/java.nio.file.Files.newDirectoryStream(Files.java:471)
> 	at java.base/java.nio.file.Files.list(Files.java:3696)
> 	at org.apache.ignite.internal.testframework.WorkDirectoryExtension.afterAll(WorkDirectoryExtension.java:101)
> {code}
> {{WorkDirectoryExtension#afterAll}} method should be modified to check if the temporary folder actually exists before checking if it's empty.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)