@@ -20,7 +20,7 @@ public class HikariTest {
2020
2121 @ Test
2222 public void mem () {
23- HikariConfig conf = Hikari .builder ()
23+ HikariConfig conf = Hikari .create ()
2424 .build (new Environment (getClass ().getClassLoader (), mapOf ("db" , "mem" ), "test" ));
2525 assertEquals (MAX_POOL_SIZE , conf .getMaximumPoolSize ());
2626 assertEquals ("org.h2.jdbcx.JdbcDataSource" , conf .getDataSourceClassName ());
@@ -35,7 +35,7 @@ public void mem() {
3535
3636 @ Test
3737 public void fs () {
38- HikariConfig conf = Hikari .builder ()
38+ HikariConfig conf = Hikari .create ()
3939 .build (new Environment (getClass ().getClassLoader (),
4040 mapOf ("db" , "fs" , "application.name" , "foo" , "application.tmpdir" , "target" ), "test" ));
4141 assertEquals (MAX_POOL_SIZE , conf .getMaximumPoolSize ());
@@ -51,7 +51,7 @@ public void fs() {
5151
5252 @ Test
5353 public void dbWithCredentials () {
54- HikariConfig conf = Hikari .builder ()
54+ HikariConfig conf = Hikari .create ()
5555 .build (new Environment (getClass ().getClassLoader (),
5656 mapOf ("db.url" , "jdbc:mysql://localhost/db" , "db.user" , "root" , "db.password" , "" ), "test" ));
5757 assertEquals (MAX_POOL_SIZE , conf .getMaximumPoolSize ());
@@ -66,7 +66,7 @@ public void dbWithCredentials() {
6666
6767 @ Test
6868 public void connectionString () {
69- HikariConfig conf = Hikari .builder ()
69+ HikariConfig conf = Hikari .create ()
7070 .build (new Environment (getClass ().getClassLoader (), mapOf ("mydb.user" , "root" , "mydb.password" , "" ), "test" ),
7171 "jdbc:mysql://localhost/mydb" );
7272 assertEquals (MAX_POOL_SIZE , conf .getMaximumPoolSize ());
@@ -81,7 +81,7 @@ public void connectionString() {
8181
8282 @ Test
8383 public void memConnectionString () {
84- HikariConfig conf = Hikari .builder ()
84+ HikariConfig conf = Hikari .create ()
8585 .build (new Environment (getClass ().getClassLoader (), ConfigFactory .empty (), "test" ), "mem" );
8686 assertEquals (MAX_POOL_SIZE , conf .getMaximumPoolSize ());
8787 assertEquals ("org.h2.jdbcx.JdbcDataSource" , conf .getDataSourceClassName ());
@@ -103,7 +103,7 @@ public void multipledb() {
103103 "db.audit.password" , "p2" ,
104104 "hikari.maximumPoolSize" , "5" ,
105105 "hikari.audit.maximumPoolSize" , "1" ), "test" );
106- HikariConfig db = Hikari .builder ().build (env , "db.main" );
106+ HikariConfig db = Hikari .create ().build (env , "db.main" );
107107 assertEquals (5 , db .getMaximumPoolSize ());
108108 assertEquals ("com.mysql.cj.jdbc.MysqlDataSource" , db .getDataSourceClassName ());
109109 assertEquals (null , db .getJdbcUrl ());
@@ -113,7 +113,7 @@ public void multipledb() {
113113 assertEquals ("p1" , db .getDataSourceProperties ().getProperty ("password" ));
114114 assertEquals ("jdbc:mysql://localhost/main" , db .getDataSourceProperties ().getProperty ("url" ));
115115
116- db = Hikari .builder ().build (env , "db.audit" );
116+ db = Hikari .create ().build (env , "db.audit" );
117117 assertEquals (1 , db .getMaximumPoolSize ());
118118 assertEquals ("com.mysql.cj.jdbc.MysqlDataSource" , db .getDataSourceClassName ());
119119 assertEquals (null , db .getJdbcUrl ());
@@ -126,7 +126,7 @@ public void multipledb() {
126126
127127 @ Test
128128 public void dbUrlWithParams () {
129- HikariConfig conf = Hikari .builder ()
129+ HikariConfig conf = Hikari .create ()
130130 .build (new Environment (getClass ().getClassLoader (),
131131 mapOf ("db.url" ,
132132 "jdbc:mysql://localhost/db?useEncoding=true&characterEncoding=UTF-8" ), "test" ));
@@ -143,7 +143,7 @@ public void dbUrlWithParams() {
143143
144144 @ Test
145145 public void hikariOptions () {
146- HikariConfig conf = Hikari .builder ()
146+ HikariConfig conf = Hikari .create ()
147147 .build (new Environment (getClass ().getClassLoader (),
148148 mapOf ("db.url" , "jdbc:mysql://localhost/db" , "hikari.db.maximumPoolSize" , "5" ), "test" ));
149149 assertEquals (5 , conf .getMaximumPoolSize ());
@@ -158,7 +158,7 @@ public void hikariOptions() {
158158
159159 @ Test
160160 public void hikariDefaultOptions () {
161- HikariConfig conf = Hikari .builder ()
161+ HikariConfig conf = Hikari .create ()
162162 .build (new Environment (getClass ().getClassLoader (),
163163 mapOf ("db.url" , "jdbc:mysql://localhost/db" , "hikari.maximumPoolSize" , "5" ), "test" ));
164164 assertEquals (5 , conf .getMaximumPoolSize ());
@@ -173,7 +173,7 @@ public void hikariDefaultOptions() {
173173
174174 @ Test
175175 public void hikariOverrideOptions () {
176- HikariConfig conf = Hikari .builder ()
176+ HikariConfig conf = Hikari .create ()
177177 .build (new Environment (getClass ().getClassLoader (),
178178 mapOf ("db.url" , "jdbc:mysql://localhost/db" , "hikari.maximumPoolSize" , "5" ,
179179 "hikari.db.maximumPoolSize" , "7" ), "test" ));
@@ -189,7 +189,7 @@ public void hikariOverrideOptions() {
189189
190190 @ Test
191191 public void overrideDataSource () {
192- HikariConfig conf = Hikari .builder ()
192+ HikariConfig conf = Hikari .create ()
193193 .build (new Environment (getClass ().getClassLoader (),
194194 mapOf ("db.url" , "jdbc:mysql://localhost/db" , "hikari.dataSourceClassName" ,
195195 "test.MyDS" ), "test" ));
@@ -204,7 +204,7 @@ public void overrideDataSource() {
204204
205205 @ Test
206206 public void noUrlProperty () {
207- HikariConfig conf = Hikari .builder ()
207+ HikariConfig conf = Hikari .create ()
208208 .build (new Environment (getClass ().getClassLoader (),
209209 mapOf (
210210 "db.host" , "localhost" ,
@@ -224,7 +224,7 @@ public void noUrlProperty() {
224224
225225 @ Test
226226 public void log4jdbc () {
227- HikariConfig conf = Hikari .builder ()
227+ HikariConfig conf = Hikari .create ()
228228 .build (new Environment (getClass ().getClassLoader (),
229229 mapOf ("db.url" , "jdbc:log4jdbc:mysql://localhost/db" ), "test" ));
230230 assertEquals (MAX_POOL_SIZE , conf .getMaximumPoolSize ());
0 commit comments