Skip to content

Commit b397dd1

Browse files
committed
Prevent tmp folder rule from removing store files
In `CredentialsIT` is was possible for `TemporaryFolder` rule to remove store files of a running database. This made subsequent tests fail because they were not able to cleanly shutdown the database.
1 parent 98d34da commit b397dd1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

driver/src/test/java/org/neo4j/driver/v1/integration/CredentialsIT.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919
package org.neo4j.driver.v1.integration;
2020

21+
import org.junit.AfterClass;
2122
import org.junit.BeforeClass;
2223
import org.junit.ClassRule;
2324
import org.junit.Test;
@@ -80,6 +81,13 @@ public static void enableAuth() throws Exception
8081
}
8182
}
8283

84+
@AfterClass
85+
public static void restartWithDefaultSettings()
86+
{
87+
// restart after the test to prevent TemporaryFolder rule from cleaning up files of a running database
88+
neo4j.restartDb( Neo4jSettings.TEST_SETTINGS );
89+
}
90+
8391
@Test
8492
public void basicCredentialsShouldWork() throws Throwable
8593
{

0 commit comments

Comments
 (0)