Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.RuntimeException: java.nio.file.DirectoryNotEmptyException #9125

Closed
anujajakhade opened this issue Mar 31, 2017 · 1 comment
Closed

Comments

@anujajakhade
Copy link

anujajakhade commented Mar 31, 2017

While executing Neo4j -3.1.0 testcases on Red Hat Enterprise Linux operating system, using OpenJDK 1.8.0_121 I am facing below error.



       java.lang.RuntimeException: java.nio.file.DirectoryNotEmptyException:test-data/org.neo4j.test.ha.ClusterTest/D4FA83E7CD83F51509461D8F437E0481/testConflictingHaPorts
        at org.neo4j.test.rule.TestDirectory.complete(TestDirectory.java:211)
        at org.neo4j.test.rule.TestDirectory.access$200(TestDirectory.java:57)
        at org.neo4j.test.rule.TestDirectory$1.evaluate(TestDirectory.java:113)
        at org.junit.rules.RunRules.evaluate(RunRules.java:20)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:254)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:149)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) 

Looks like it is unable to delete the directory and hence facing the above execption. The user has all the permissions granted. I have checked for hidden files which might cause the issue, however that's not the case .

Below is the java version i am using.

openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-b13)
OpenJDK 64-Bit Zero VM (build 25.121-b13, interpreted mode)

I suspect that the below code snippet is causing the error.

 private void complete( boolean success )
    {
        if ( success && testDirectory != null && !keepDirectoryAfterSuccessfulTest )
        {
            try
            {
                fileSystem.deleteRecursively( testDirectory );
            }
            catch ( MaybeWindowsMemoryMappedFileReleaseProblem fme )
            {
                System.err.println( "Failed to delete test directory, " +
                                    "maybe due to Windows memory-mapped file problem: " + fme.getMessage() );
            }
            catch ( IOException e )
            {
                throw new RuntimeException( e );
           }
        }
        testDirectory = null;
}

@chrisvest
Copy link
Contributor

Failing and flaky tests come and go all the time. Since issue is quite old, and that test look like it has since been removed, I'll assume it's not relevant any more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants