Skip to content

Commit 5c5c187

Browse files
committed
feat: improve sql audit store test
1 parent 804208c commit 5c5c187

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

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

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,8 @@ public static JdbcDatabaseContainer<?> createContainer(String dialectName) {
4646
.acceptLicense()
4747
.withPassword("TestPass123!")
4848
.withReuse(true);
49-
case "oracle":
50-
OracleContainer oracleContainer = new OracleContainer(
51-
DockerImageName.parse("gvenzl/oracle-free:23-slim-faststart")
52-
.asCompatibleSubstituteFor("gvenzl/oracle-xe"))
53-
.withPassword("oracle123")
54-
.withSharedMemorySize(1073741824L)
55-
.withStartupTimeoutSeconds(900)
56-
.withEnv("ORACLE_CHARACTERSET", "AL32UTF8");
57-
58-
if (!isCi) oracleContainer.withReuse(true);
59-
60-
return new OracleContainer(
49+
case "oracle": {
50+
OracleContainer oracle = new OracleContainer(
6151
DockerImageName.parse("gvenzl/oracle-free:23-slim-faststart")
6252
.asCompatibleSubstituteFor("gvenzl/oracle-xe")) {
6353
@Override
@@ -68,8 +58,14 @@ public String getDatabaseName() {
6858
.withPassword("oracle123")
6959
.withSharedMemorySize(1073741824L)
7060
.withStartupTimeoutSeconds(900)
71-
.withEnv("ORACLE_CHARACTERSET", "AL32UTF8")
72-
.withReuse(true);
61+
.withEnv("ORACLE_CHARACTERSET", "AL32UTF8");
62+
63+
if (!isCi) {
64+
oracle.withReuse(true);
65+
}
66+
67+
return oracle;
68+
}
7369
case "postgresql":
7470
return new PostgreSQLContainer<>(DockerImageName.parse("postgres:15"))
7571
.withDatabaseName("testdb")

0 commit comments

Comments
 (0)