From 06509d26ce251f4bec6b95a6b7f0e42c6255de53 Mon Sep 17 00:00:00 2001 From: Jiri Pechanec Date: Wed, 2 Oct 2019 17:30:59 +0200 Subject: [PATCH] DBZ-1401 Database blocked after test --- .../connector/sqlserver/TablesWithoutPrimaryKeyIT.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debezium-connector-sqlserver/src/test/java/io/debezium/connector/sqlserver/TablesWithoutPrimaryKeyIT.java b/debezium-connector-sqlserver/src/test/java/io/debezium/connector/sqlserver/TablesWithoutPrimaryKeyIT.java index d3263df20..71d67050f 100644 --- a/debezium-connector-sqlserver/src/test/java/io/debezium/connector/sqlserver/TablesWithoutPrimaryKeyIT.java +++ b/debezium-connector-sqlserver/src/test/java/io/debezium/connector/sqlserver/TablesWithoutPrimaryKeyIT.java @@ -9,6 +9,7 @@ import java.sql.SQLException; import org.fest.assertions.Assertions; +import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -45,6 +46,13 @@ public void before() throws SQLException { Testing.Files.delete(TestHelper.DB_HISTORY_PATH); } + @After + public void after() throws SQLException { + if (connection != null) { + connection.close(); + } + } + @Test public void shouldProcessFromSnapshot() throws Exception { connection = TestHelper.testConnection();