File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
main/java/io/ebean/datasource
test/java/io/ebean/datasource Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,9 @@ public DataSourceConfig setDefaults(DataSourceBuilder builder) {
182182 if (minConnections == 2 && other .getMinConnections () < 2 ) {
183183 minConnections = other .getMinConnections ();
184184 }
185+ if (maxConnections == 200 && other .getMaxConnections () != 200 ) {
186+ maxConnections = other .getMaxConnections ();
187+ }
185188 if (!shutdownOnJvmExit && other .isShutdownOnJvmExit ()) {
186189 shutdownOnJvmExit = true ;
187190 }
Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ public void defaults_someOverride() {
139139 assertThat (readOnly .getUrl ()).isEqualTo ("jdbc:postgresql://127.0.0.2:5432/unit" );
140140 assertThat (readOnly .getUsername ()).isEqualTo ("foo2" );
141141 assertThat (readOnly .getMinConnections ()).isEqualTo (3 );
142+ assertThat (readOnly .getMaxConnections ()).isEqualTo (20 );
142143 assertThat (readOnly .isShutdownOnJvmExit ()).isFalse ();
143144 assertThat (readOnly .isValidateOnHeartbeat ()).isFalse ();
144145 }
@@ -163,6 +164,7 @@ private DataSourceConfig create() {
163164 .setUsername ("foo" )
164165 .setPassword ("bar" )
165166 .setMinConnections (1 )
167+ .setMaxConnections (20 )
166168 .addProperty ("useSSL" , false );
167169 }
168170
You can’t perform that action at this time.
0 commit comments