Skip to content

Commit 6d818ba

Browse files
committed
Fix flaky boltkit test
`GraphDatabaseTest#boltSchemeShouldInstantiateDirectDriver()` did not properly close driver which resulted in sporadically failing Windows builds.
1 parent ddc8cc5 commit 6d818ba

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

driver/src/test/java/org/neo4j/driver/v1/GraphDatabaseTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ public void boltSchemeShouldInstantiateDirectDriver() throws Exception
5050

5151
// Then
5252
assertThat( driver, is( directDriver() ) );
53-
server.exit();
53+
54+
// Finally
55+
driver.close();
56+
assertThat( server.exitStatus(), equalTo( 0 ) );
5457
}
5558

5659
@Test

driver/src/test/java/org/neo4j/driver/v1/util/StubServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public int exitStatus() throws InterruptedException, ForceKilled
7979
}
8080
}
8181

82-
public void exit() throws InterruptedException
82+
private void exit() throws InterruptedException
8383
{
8484
process.destroy();
8585
process.waitFor();

0 commit comments

Comments
 (0)