[MINOR] Fixing close for HoodieCatalog's test (#5531)
* [MINOR] Fixing close for HoodieCatalog's test
This commit is contained in:
@@ -42,6 +42,7 @@ import org.apache.flink.table.catalog.exceptions.DatabaseNotExistException;
|
|||||||
import org.apache.flink.table.catalog.exceptions.TableAlreadyExistException;
|
import org.apache.flink.table.catalog.exceptions.TableAlreadyExistException;
|
||||||
import org.apache.flink.table.catalog.exceptions.TableNotExistException;
|
import org.apache.flink.table.catalog.exceptions.TableNotExistException;
|
||||||
import org.apache.flink.table.types.logical.LogicalTypeRoot;
|
import org.apache.flink.table.types.logical.LogicalTypeRoot;
|
||||||
|
import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.jupiter.api.io.TempDir;
|
import org.junit.jupiter.api.io.TempDir;
|
||||||
@@ -138,6 +139,13 @@ public class TestHoodieCatalog {
|
|||||||
catalog.open();
|
catalog.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@AfterEach
|
||||||
|
void afterEach() {
|
||||||
|
if (catalog != null) {
|
||||||
|
catalog.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testListDatabases() {
|
public void testListDatabases() {
|
||||||
List<String> actual = catalog.listDatabases();
|
List<String> actual = catalog.listDatabases();
|
||||||
|
|||||||
Reference in New Issue
Block a user