-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert previous change, introduce tmpfs and bump MySQL driver and Tes…
…tContainers versions
- Loading branch information
1 parent
bbbd577
commit d870f22
Showing
9 changed files
with
144 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 18 additions & 3 deletions
21
...c/test/java/com/gruelbox/transactionoutbox/jooq/acceptance/TestJooqThreadLocalMySql5.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 18 additions & 3 deletions
21
...c/test/java/com/gruelbox/transactionoutbox/jooq/acceptance/TestJooqThreadLocalMySql8.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 19 additions & 5 deletions
24
...ds/src/test/java/com/gruelbox/transactionoutbox/virtthreads/TestVirtualThreadsMySql5.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,35 @@ | ||
package com.gruelbox.transactionoutbox.virtthreads; | ||
|
||
import static com.gruelbox.transactionoutbox.Dialect.MY_SQL_5; | ||
|
||
import com.gruelbox.transactionoutbox.Dialect; | ||
import java.time.Duration; | ||
import java.util.Map; | ||
import org.junit.jupiter.api.Disabled; | ||
import org.testcontainers.containers.JdbcDatabaseContainer; | ||
import org.testcontainers.containers.MySQLContainer; | ||
import org.testcontainers.junit.jupiter.Container; | ||
import org.testcontainers.junit.jupiter.Testcontainers; | ||
|
||
@SuppressWarnings("WeakerAccess") | ||
@Testcontainers | ||
@Disabled | ||
class TestVirtualThreadsMySql5 extends AbstractVirtualThreadsTest { | ||
|
||
@Container | ||
@SuppressWarnings({"rawtypes", "resource"}) | ||
private static final JdbcDatabaseContainer container = | ||
new MySQLContainer<>("mysql:5") | ||
.withStartupTimeout(Duration.ofMinutes(5)) | ||
.withTmpFs(Map.of("/var/lib/mysql", "rw")); | ||
|
||
@Override | ||
protected ConnectionDetails connectionDetails() { | ||
return ConnectionDetails.builder() | ||
.dialect(Dialect.MY_SQL_5) | ||
.dialect(MY_SQL_5) | ||
.driverClassName("com.mysql.cj.jdbc.Driver") | ||
.url("jdbc:tc:mysql:5:///test?TC_REUSABLE=true&TC_TMPFS=/var/lib/mysql:rw") | ||
.user("test") | ||
.password("test") | ||
.url(container.getJdbcUrl()) | ||
.user(container.getUsername()) | ||
.password(container.getPassword()) | ||
.build(); | ||
} | ||
} |
24 changes: 19 additions & 5 deletions
24
...ds/src/test/java/com/gruelbox/transactionoutbox/virtthreads/TestVirtualThreadsMySql8.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,35 @@ | ||
package com.gruelbox.transactionoutbox.virtthreads; | ||
|
||
import static com.gruelbox.transactionoutbox.Dialect.MY_SQL_8; | ||
|
||
import com.gruelbox.transactionoutbox.Dialect; | ||
import java.time.Duration; | ||
import java.util.Map; | ||
import org.junit.jupiter.api.Disabled; | ||
import org.testcontainers.containers.JdbcDatabaseContainer; | ||
import org.testcontainers.containers.MySQLContainer; | ||
import org.testcontainers.junit.jupiter.Container; | ||
import org.testcontainers.junit.jupiter.Testcontainers; | ||
|
||
@SuppressWarnings("WeakerAccess") | ||
@Testcontainers | ||
@Disabled | ||
class TestVirtualThreadsMySql8 extends AbstractVirtualThreadsTest { | ||
|
||
@Container | ||
@SuppressWarnings({"rawtypes", "resource"}) | ||
private static final JdbcDatabaseContainer container = | ||
new MySQLContainer<>("mysql:8") | ||
.withStartupTimeout(Duration.ofMinutes(5)) | ||
.withTmpFs(Map.of("/var/lib/mysql", "rw")); | ||
|
||
@Override | ||
protected ConnectionDetails connectionDetails() { | ||
return ConnectionDetails.builder() | ||
.dialect(Dialect.MY_SQL_8) | ||
.dialect(MY_SQL_8) | ||
.driverClassName("com.mysql.cj.jdbc.Driver") | ||
.url("jdbc:tc:mysql:8:///test?TC_REUSABLE=true&TC_TMPFS=/var/lib/mysql:rw") | ||
.user("test") | ||
.password("test") | ||
.url(container.getJdbcUrl()) | ||
.user(container.getUsername()) | ||
.password(container.getPassword()) | ||
.build(); | ||
} | ||
} |