Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-use containers #593

Merged
merged 2 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class TestMySql5 extends AbstractAcceptanceTest {
private static final JdbcDatabaseContainer container =
new MySQLContainer<>("mysql:5")
.withStartupTimeout(Duration.ofMinutes(5))
.withReuse(true)
.withTmpFs(Map.of("/var/lib/mysql", "rw"));

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class TestMySql8 extends AbstractAcceptanceTest {
private static final JdbcDatabaseContainer container =
new MySQLContainer<>("mysql:8")
.withStartupTimeout(Duration.ofMinutes(5))
.withReuse(true)
.withTmpFs(Map.of("/var/lib/mysql", "rw"));

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class TestPostgres11 extends AbstractAcceptanceTest {
@SuppressWarnings({"rawtypes", "resource"})
private static final JdbcDatabaseContainer container =
(JdbcDatabaseContainer)
new PostgreSQLContainer("postgres:11").withStartupTimeout(Duration.ofHours(1));
new PostgreSQLContainer("postgres:11")
.withStartupTimeout(Duration.ofHours(1))
.withReuse(true);

@Override
protected ConnectionDetails connectionDetails() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class TestPostgres12 extends AbstractAcceptanceTest {
@SuppressWarnings({"rawtypes", "resource"})
private static final JdbcDatabaseContainer container =
(JdbcDatabaseContainer)
new PostgreSQLContainer("postgres:12").withStartupTimeout(Duration.ofHours(1));
new PostgreSQLContainer("postgres:12")
.withStartupTimeout(Duration.ofHours(1))
.withReuse(true);

@Override
protected ConnectionDetails connectionDetails() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class TestPostgres13 extends AbstractAcceptanceTest {
@SuppressWarnings({"rawtypes", "resource"})
private static final JdbcDatabaseContainer container =
(JdbcDatabaseContainer)
new PostgreSQLContainer("postgres:13").withStartupTimeout(Duration.ofHours(1));
new PostgreSQLContainer("postgres:13")
.withStartupTimeout(Duration.ofHours(1))
.withReuse(true);

@Override
protected ConnectionDetails connectionDetails() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class TestPostgres14 extends AbstractAcceptanceTest {
@SuppressWarnings({"rawtypes", "resource"})
private static final JdbcDatabaseContainer container =
(JdbcDatabaseContainer)
new PostgreSQLContainer("postgres:14").withStartupTimeout(Duration.ofHours(1));
new PostgreSQLContainer("postgres:14")
.withStartupTimeout(Duration.ofHours(1))
.withReuse(true);

@Override
protected ConnectionDetails connectionDetails() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class TestPostgres15 extends AbstractAcceptanceTest {
@SuppressWarnings({"rawtypes", "resource"})
private static final JdbcDatabaseContainer container =
(JdbcDatabaseContainer)
new PostgreSQLContainer("postgres:15").withStartupTimeout(Duration.ofHours(1));
new PostgreSQLContainer("postgres:15")
.withStartupTimeout(Duration.ofHours(1))
.withReuse(true);

@Override
protected ConnectionDetails connectionDetails() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class TestPostgres16 extends AbstractAcceptanceTest {
@SuppressWarnings({"rawtypes", "resource"})
private static final JdbcDatabaseContainer container =
(JdbcDatabaseContainer)
new PostgreSQLContainer("postgres:16").withStartupTimeout(Duration.ofHours(1));
new PostgreSQLContainer("postgres:16")
.withStartupTimeout(Duration.ofHours(1))
.withReuse(true);

@Override
protected ConnectionDetails connectionDetails() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class TestDefaultPersistorMySql5 extends AbstractPersistorTest {
private static final JdbcDatabaseContainer container =
new MySQLContainer<>("mysql:5")
.withStartupTimeout(Duration.ofMinutes(5))
.withReuse(true)
.withTmpFs(Map.of("/var/lib/mysql", "rw"));

private final DefaultPersistor persistor =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class TestDefaultPersistorMySql8 extends AbstractPersistorTest {
private static final JdbcDatabaseContainer container =
new MySQLContainer<>("mysql:8")
.withStartupTimeout(Duration.ofMinutes(5))
.withReuse(true)
.withTmpFs(Map.of("/var/lib/mysql", "rw"));

private final DefaultPersistor persistor =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ class TestDefaultPersistorPostgres16 extends AbstractPersistorTest {
@SuppressWarnings({"rawtypes", "resource"})
private static final JdbcDatabaseContainer container =
(JdbcDatabaseContainer)
new PostgreSQLContainer("postgres:16").withStartupTimeout(Duration.ofHours(1));
new PostgreSQLContainer("postgres:16")
.withStartupTimeout(Duration.ofHours(1))
.withReuse(true);

private final DefaultPersistor persistor =
DefaultPersistor.builder().dialect(Dialect.POSTGRESQL_9).build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class TestJooqThreadLocalMySql5 extends AbstractJooqAcceptanceThreadLocalTest {
(JdbcDatabaseContainer<?>)
new MySQLContainer("mysql:5")
.withStartupTimeout(Duration.ofMinutes(5))
.withReuse(true)
.withTmpFs(Map.of("/var/lib/mysql", "rw"));

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class TestJooqThreadLocalMySql8 extends AbstractJooqAcceptanceThreadLocalTest {
(JdbcDatabaseContainer<?>)
new MySQLContainer("mysql:8")
.withStartupTimeout(Duration.ofMinutes(5))
.withReuse(true)
.withTmpFs(Map.of("/var/lib/mysql", "rw"));

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ class TestJooqThreadLocalPostgres16 extends AbstractJooqAcceptanceThreadLocalTes
@SuppressWarnings({"rawtypes", "resource"})
private static final JdbcDatabaseContainer container =
(JdbcDatabaseContainer)
new PostgreSQLContainer("postgres:16").withStartupTimeout(Duration.ofHours(1));
new PostgreSQLContainer("postgres:16")
.withStartupTimeout(Duration.ofHours(1))
.withReuse(true);

@Override
protected ConnectionDetails connectionDetails() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class TestVirtualThreadsMySql5 extends AbstractVirtualThreadsTest {
private static final JdbcDatabaseContainer container =
new MySQLContainer<>("mysql:5")
.withStartupTimeout(Duration.ofMinutes(5))
.withReuse(true)
.withTmpFs(Map.of("/var/lib/mysql", "rw"));

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class TestVirtualThreadsMySql8 extends AbstractVirtualThreadsTest {
private static final JdbcDatabaseContainer container =
new MySQLContainer<>("mysql:8")
.withStartupTimeout(Duration.ofMinutes(5))
.withReuse(true)
.withTmpFs(Map.of("/var/lib/mysql", "rw"));

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class TestVirtualThreadsPostgres16 extends AbstractVirtualThreadsTest {
@SuppressWarnings({"rawtypes", "resource"})
private static final JdbcDatabaseContainer container =
(JdbcDatabaseContainer)
new PostgreSQLContainer("postgres:16").withStartupTimeout(Duration.ofHours(1));
new PostgreSQLContainer("postgres:16")
.withStartupTimeout(Duration.ofHours(1))
.withReuse(true);

@Override
protected ConnectionDetails connectionDetails() {
Expand Down
Loading