Skip to content

[Bug] when I try to run tests it fails cause files could not delete since they are occupied by other threads #1546

@homesickjava

Description

@homesickjava

Search before asking

  • I searched in the issues and found nothing similar.

Paimon version

when I try to run paimon tests with following command:
mvn clean install -Drat.skip=true -Dcheckstyle.skip=true -Djdk.net.URLClassPath.disableClassPathURLCheck=true -Pflink-1.17

and it always run failed because the following exception:

            Suppressed: java.nio.file.FileSystemException: C:\Users\ThinkPad\AppData\Local\Temp\junit6655132301266813722\14251040-b582-4002-9e8d-1b8364b01c0d\i

ndex1.dat: 另一个程序正在使用此文件,进程无法访问。

                    at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
                    at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
                    at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
                    at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269)
                    at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
                    at java.nio.file.Files.delete(Files.java:1126)
                    at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath$1.resetPermissionsAndTryToDeleteAgain(TempDirectory.java:250)
                    at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath$1.deleteAndContinue(TempDirectory.java:238)
                    ... 72 more

how can i fix this problem

Compute Engine

flink engine
I firstly import this project into my IDEA, and then build it. if i skip tests, it build ok, however, when i want to build and run those test cases, it fail

Minimal reproduce step

1, git clone https://github.com/apache/incubator-paimon.git
2, in your IDEA, import this project into it
3, setting maven and jdk in your IDEA
4, run those commands :
1) mvn spotless:apply
2) mvn clean install -Drat.skip=true -Dcheckstyle.skip=true -Djdk.net.URLClassPath.disableClassPathURLCheck=true -Pflink-1.17

What doesn't meet your expectations?

I want to run those test cases well in the IDEA

Anything else?

no

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions