File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/test/java/org/springframework/data/r2dbc/testing Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 2828
2929import org .testcontainers .containers .MySQLContainer ;
3030
31- import com .github .jasync .r2dbc .mysql .MysqlConnectionFactoryProvider ;
3231import com .mysql .cj .jdbc .MysqlDataSource ;
3332
3433/**
@@ -98,7 +97,7 @@ private static ExternalDatabase local() {
9897 .database ("mysql" ) //
9998 .username ("root" ) //
10099 .password ("my-secret-pw" ) //
101- .jdbcUrl ("jdbc:mysql://localhost:3306/mysql" ) //
100+ .jdbcUrl ("jdbc:mysql://localhost:3306/mysql?allowPublicKeyRetrieval=true " ) //
102101 .build ();
103102 }
104103
@@ -110,7 +109,7 @@ private static ExternalDatabase testContainer() {
110109 if (testContainerDatabase == null ) {
111110
112111 try {
113- MySQLContainer container = new MySQLContainer (MySQLContainer . IMAGE + ":" + MySQLContainer . DEFAULT_TAG );
112+ MySQLContainer container = new MySQLContainer ("mysql:8.0.24" );
114113 container .start ();
115114
116115 testContainerDatabase = ProvidedDatabase .builder (container ) //
@@ -153,7 +152,7 @@ public static DataSource createDataSource(ExternalDatabase database) {
153152
154153 dataSource .setUser (database .getUsername ());
155154 dataSource .setPassword (database .getPassword ());
156- dataSource .setURL (database .getJdbcUrl () + "?useSSL=false" );
155+ dataSource .setURL (database .getJdbcUrl () + "?useSSL=false&allowPublicKeyRetrieval=true " );
157156
158157 return dataSource ;
159158 }
You can’t perform that action at this time.
0 commit comments