Skip to content

Commit 804208c

Browse files
committed
feat: improve sql audit store test
1 parent 8a79626 commit 804208c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

community/flamingock-auditstore-sql/src/test/java/io/flamingock/community/sql/SqlAuditTestHelper.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
public class SqlAuditTestHelper {
3333

3434
public static JdbcDatabaseContainer<?> createContainer(String dialectName) {
35+
boolean isCi = System.getenv("CI") != null || System.getenv("GITHUB_ACTIONS") != null;
36+
3537
switch (dialectName) {
3638
case "mysql":
3739
return new MySQLContainer<>("mysql:8.0")
@@ -51,8 +53,9 @@ public static JdbcDatabaseContainer<?> createContainer(String dialectName) {
5153
.withPassword("oracle123")
5254
.withSharedMemorySize(1073741824L)
5355
.withStartupTimeoutSeconds(900)
54-
.withEnv("ORACLE_CHARACTERSET", "AL32UTF8")
55-
.withReuse(true);
56+
.withEnv("ORACLE_CHARACTERSET", "AL32UTF8");
57+
58+
if (!isCi) oracleContainer.withReuse(true);
5659

5760
return new OracleContainer(
5861
DockerImageName.parse("gvenzl/oracle-free:23-slim-faststart")

0 commit comments

Comments
 (0)