Skip to content

Commit 32fb8e2

Browse files
committed
Merge branch 'owls75767' of https://github.com/oracle/weblogic-kubernetes-operator into owls75767
2 parents b6f79c0 + 8e9facc commit 32fb8e2

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

integration-tests/src/test/java/oracle/kubernetes/operator/ItSitConfig.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import java.nio.file.Paths;
1313
import java.util.Map;
1414
import java.util.logging.Level;
15-
1615
import oracle.kubernetes.operator.utils.Domain;
1716
import oracle.kubernetes.operator.utils.ExecResult;
1817
import oracle.kubernetes.operator.utils.Operator;
@@ -34,6 +33,9 @@ public class ItSitConfig extends BaseTest {
3433
private static String ADMINPODNAME;
3534
private static String fqdn;
3635
private static String JDBC_URL;
36+
private static final String JDBC_DRIVER_NEW = "com.mysql.cj.jdbc.Driver";
37+
private static final String JDBC_DRIVER_OLD = "com.mysql.jdbc.Driver";
38+
private static final String PS3_TAG = "12.2.1.3";
3739
private static String KUBE_EXEC_CMD;
3840
private static Domain domain;
3941
private static Operator operator1;
@@ -171,6 +173,9 @@ private static void copySitConfigFiles() throws IOException {
171173
Charset charset = StandardCharsets.UTF_8;
172174
String content = new String(Files.readAllBytes(path), charset);
173175
content = content.replaceAll("JDBC_URL", JDBC_URL);
176+
if (getWeblogicImageTag().contains(PS3_TAG)) {
177+
content = content.replaceAll(JDBC_DRIVER_NEW, JDBC_DRIVER_OLD);
178+
}
174179
path = Paths.get(dstDir, file);
175180
logger.log(Level.INFO, "to {0}", path.toString());
176181
Files.write(path, content.getBytes(charset));

integration-tests/src/test/resources/sitconfig/configoverrides/jdbc-JdbcTestDataSource-0.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</jdbc:jdbc-connection-pool-params>
1414
<jdbc:jdbc-driver-params>
1515
<jdbc:url jdbcf:combine-mode="replace">JDBC_URL</jdbc:url>
16-
<jdbc:driver-name>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</jdbc:driver-name>
16+
<jdbc:driver-name>com.mysql.cj.jdbc.Driver</jdbc:driver-name>
1717
<jdbc:properties>
1818
<jdbc:property>
1919
<jdbc:name>user</jdbc:name>

integration-tests/src/test/resources/sitconfig/scripts/create-domain-auto-custom-sit-config20.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def createDataSource(dsName, dsJNDI, dsUrl, dsUser, dsPassword, dsTarget):
8383
cd('/JDBCSystemResource/' + dsName + '/JdbcResource/' + dsName)
8484
create('testDriverParams', 'JDBCDriverParams')
8585
cd('JDBCDriverParams/NO_NAME_0')
86-
set('DriverName', 'com.mysql.jdbc.jdbc2.optional.MysqlXADataSource')
86+
set('DriverName', 'com.mysql.cj.jdbc.Driver')
8787
set('URL', dsUrl)
8888
set('PasswordEncrypted', dsPassword)
8989

0 commit comments

Comments
 (0)