Skip to content

Commit

Permalink
Add server shutdown to DatabaseExtension
Browse files Browse the repository at this point in the history
  • Loading branch information
injectives committed Sep 28, 2021
1 parent 16a321d commit 51a7b66
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
package org.neo4j.driver.util;

import org.junit.jupiter.api.extension.AfterAllCallback;
import org.junit.jupiter.api.extension.BeforeEachCallback;
import org.junit.jupiter.api.extension.ExtensionContext;

Expand All @@ -41,7 +42,7 @@
import static org.neo4j.driver.util.Neo4jSettings.DEFAULT_TLS_CERT_PATH;
import static org.neo4j.driver.util.Neo4jSettings.DEFAULT_TLS_KEY_PATH;

public class DatabaseExtension implements BeforeEachCallback
public class DatabaseExtension implements BeforeEachCallback, AfterAllCallback
{
static final String TEST_RESOURCE_FOLDER_PATH = "src/test/resources";

Expand All @@ -66,6 +67,12 @@ public void beforeEach( ExtensionContext context ) throws Exception
TestUtil.cleanDb( driver() );
}

@Override
public void afterAll( ExtensionContext context )
{
runner.stopNeo4j();
}

public Driver driver()
{
return runner.driver();
Expand Down

0 comments on commit 51a7b66

Please sign in to comment.