codecentric / gatling-jdbc

JDBC support for Gatling
Apache License 2.0
23 stars 18 forks source link

Connection Pool settings #9

Closed respergu closed 5 years ago

respergu commented 5 years ago

Currently we are using default connection pool configuration,

ConnectionPool.singleton(url, username, pwd)

it would be nice to be able to configure the scalikejdbc connection pool Seems that in some cases max size 8 is not enough when doing load testing.

rbraeunlich commented 5 years ago

Hi @respergu I agree, the connection pool should be configurable. I'll take a look into that. Cheers, Ronny

rbraeunlich commented 5 years ago

Hi @respergu I released jdbc-gatling 2.1.0. There you can configure your connection pool like this:

    val settings = ConnectionPoolSettings(maxSize = 20)
    jdbc
      .url("jdbc:h2:mem:test;DB_CLOSE_ON_EXIT=FALSE")
      .username("sa")
      .password("sa")
      .driver("org.h2.Driver")
      .connectionPoolSettings(settings)
      .build
respergu commented 5 years ago

Thanks! this is really useful!