Skip to content

Commit a9c41e3

Browse files
authored
Merge pull request #1205 from microsoft/littleaj/fix_jdbc_tests
fix jdbc tests
2 parents e9119f2 + 8b7a575 commit a9c41e3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

test/smoke/testApps/Jdbc/src/main/java/com/microsoft/applicationinsights/smoketestapp/JdbcTestServlet.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,12 @@ private static Connection getHsqldbConnection() throws Exception {
263263

264264
private static Connection getMysqlConnection() throws Exception {
265265
String hostname = System.getenv("MYSQL");
266-
return DriverManager.getConnection("jdbc:mysql://" + hostname + "/mysql", "root", "password");
266+
return DriverManager.getConnection("jdbc:mysql://" + hostname + "/mysql?autoReconnect=true&useSSL=true&verifyServerCertificate=false", "root", "password");
267267
}
268268

269269
private static Connection getPostgresConnection() throws Exception {
270270
String hostname = System.getenv("POSTGRES");
271-
return DriverManager.getConnection("jdbc:postgresql://" + hostname + "/postgres", "postgres", "");
271+
return DriverManager.getConnection("jdbc:postgresql://" + hostname + "/postgres", "postgres", "passw0rd2");
272272
}
273273

274274
private static Connection getSqlServerConnection() throws Exception {

test/smoke/testApps/Jdbc/src/smokeTest/java/com/microsoft/applicationinsights/smoketestapp/JdbcSmokeTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
@DependencyContainer(
2929
value = "postgres:11",
3030
portMapping = "5432",
31+
environmentVariables = {"POSTGRES_PASSWORD=passw0rd2"},
3132
hostnameEnvironmentVariable = "POSTGRES"),
3233
@DependencyContainer(
3334
value = "mcr.microsoft.com/mssql/server:2017-latest",

0 commit comments

Comments
 (0)