summaryrefslogtreecommitdiff
path: root/src/test/kotlin/dev
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/kotlin/dev')
-rw-r--r--src/test/kotlin/dev/dnpm/etl/processor/AbstractTestcontainerTest.kt8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/test/kotlin/dev/dnpm/etl/processor/AbstractTestcontainerTest.kt b/src/test/kotlin/dev/dnpm/etl/processor/AbstractTestcontainerTest.kt
index 3bd934f..13b57d0 100644
--- a/src/test/kotlin/dev/dnpm/etl/processor/AbstractTestcontainerTest.kt
+++ b/src/test/kotlin/dev/dnpm/etl/processor/AbstractTestcontainerTest.kt
@@ -28,7 +28,7 @@ abstract class AbstractTestcontainerTest {
companion object {
@Container
- val dbContainer = PostgreSQLContainer("postgres:10-alpine")
+ val dbContainer = CustomPostgreSQLContainer("postgres:10-alpine")
.withDatabaseName("test")
.withUsername("test")
.withPassword("test") ?: throw RuntimeException("Failed to create testcontainer!")
@@ -42,4 +42,10 @@ abstract class AbstractTestcontainerTest {
}
}
+}
+
+class CustomPostgreSQLContainer(dockerImageName: String) : PostgreSQLContainer<CustomPostgreSQLContainer>(dockerImageName) {
+ override fun stop() {
+ // Keep Testcontainer alive until JVM destroys it
+ }
} \ No newline at end of file