From e9999ad2ffe0f8f69d5232310d8403cbcc1f75d8 Mon Sep 17 00:00:00 2001 From: Ruud Welling Date: Mon, 26 Mar 2018 12:03:53 +0200 Subject: [PATCH] Aligned numThreads and maxConnections in the reference config and the test configs (#178) --- src/main/resources/reference.conf | 8 ++++---- src/test/resources/h2-application.conf | 6 +++--- src/test/resources/h2-two-read-journals-application.conf | 6 +++--- src/test/resources/mysql-application.conf | 6 +++--- src/test/resources/oracle-application.conf | 6 +++--- src/test/resources/postgres-application.conf | 6 +++--- src/test/scala/akka/persistence/jdbc/TablesTestSpec.scala | 6 +++--- .../jdbc/configuration/AkkaPersistenceConfigTest.scala | 6 +++--- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/main/resources/reference.conf b/src/main/resources/reference.conf index 05dc02331..a730ded98 100644 --- a/src/main/resources/reference.conf +++ b/src/main/resources/reference.conf @@ -118,7 +118,7 @@ jdbc-journal { numThreads = 20 # 5 * number of threads - maxConnections = 100 + maxConnections = 20 # number of threads minConnections = 20 @@ -216,7 +216,7 @@ jdbc-snapshot-store { numThreads = 20 # 5 * number of threads - maxConnections = 100 + maxConnections = 20 # number of threads minConnections = 20 @@ -350,8 +350,8 @@ jdbc-read-journal { # 5 * number of cores numThreads = 20 - # 5 * number of threads - maxConnections = 100 + # number of threads + maxConnections = 20 # number of threads minConnections = 20 diff --git a/src/test/resources/h2-application.conf b/src/test/resources/h2-application.conf index 1f5198a20..71c4425a7 100644 --- a/src/test/resources/h2-application.conf +++ b/src/test/resources/h2-application.conf @@ -17,7 +17,7 @@ include "general.conf" jdbc-journal { slick = ${slick} slick.db.numThreads = 20 - slick.db.maxConnections = 100 + slick.db.maxConnections = 20 slick.db.minConnections = 1 slick.db.connectionTimeout = 1800000 // 30 minutes @@ -39,7 +39,7 @@ jdbc-journal { jdbc-snapshot-store { slick = ${slick} slick.db.numThreads = 20 - slick.db.maxConnections = 100 + slick.db.maxConnections = 20 slick.db.minConnections = 1 slick.db.connectionTimeout = 1800000 // 30 minutes } @@ -54,7 +54,7 @@ jdbc-read-journal { slick = ${slick} slick.db.numThreads = 20 - slick.db.maxConnections = 100 + slick.db.maxConnections = 20 slick.db.minConnections = 1 slick.db.connectionTimeout = 1800000 // 30 minutes } diff --git a/src/test/resources/h2-two-read-journals-application.conf b/src/test/resources/h2-two-read-journals-application.conf index 1e2533db9..adfa5eee3 100644 --- a/src/test/resources/h2-two-read-journals-application.conf +++ b/src/test/resources/h2-two-read-journals-application.conf @@ -17,7 +17,7 @@ include "general.conf" jdbc-journal { slick = ${slick} slick.db.numThreads = 20 - slick.db.maxConnections = 100 + slick.db.maxConnections = 20 slick.db.minConnections = 1 slick.db.connectionTimeout = 1800000 // 30 minutes @@ -39,7 +39,7 @@ jdbc-journal { jdbc-snapshot-store { slick = ${slick} slick.db.numThreads = 20 - slick.db.maxConnections = 100 + slick.db.maxConnections = 20 slick.db.minConnections = 1 slick.db.connectionTimeout = 1800000 // 30 minutes } @@ -54,7 +54,7 @@ jdbc-read-journal { slick = ${slick} slick.db.numThreads = 20 - slick.db.maxConnections = 100 + slick.db.maxConnections = 20 slick.db.minConnections = 1 slick.db.connectionTimeout = 1800000 // 30 minutes } diff --git a/src/test/resources/mysql-application.conf b/src/test/resources/mysql-application.conf index fe8cf8dd1..cfb9cd371 100644 --- a/src/test/resources/mysql-application.conf +++ b/src/test/resources/mysql-application.conf @@ -18,7 +18,7 @@ include "docker.conf" jdbc-journal { slick = ${slick} slick.db.numThreads = 20 - slick.db.maxConnections = 100 + slick.db.maxConnections = 20 slick.db.minConnections = 1 slick.db.connectionTimeout = 1800000 // 30 minutes @@ -41,7 +41,7 @@ jdbc-journal { jdbc-snapshot-store { slick = ${slick} slick.db.numThreads = 20 - slick.db.maxConnections = 100 + slick.db.maxConnections = 20 slick.db.minConnections = 1 slick.db.connectionTimeout = 1800000 // 30 minutes } @@ -56,7 +56,7 @@ jdbc-read-journal { slick = ${slick} slick.db.numThreads = 20 - slick.db.maxConnections = 100 + slick.db.maxConnections = 20 slick.db.minConnections = 1 slick.db.connectionTimeout = 1800000 // 30 minutes } diff --git a/src/test/resources/oracle-application.conf b/src/test/resources/oracle-application.conf index 0d4204cae..6eaf1526b 100644 --- a/src/test/resources/oracle-application.conf +++ b/src/test/resources/oracle-application.conf @@ -25,7 +25,7 @@ jdbc-journal { slick = ${slick} slick.db.numThreads = 20 - slick.db.maxConnections = 100 + slick.db.maxConnections = 20 slick.db.minConnections = 1 slick.db.connectionTimeout = 1800000 // 30 minutes @@ -60,7 +60,7 @@ jdbc-snapshot-store { slick = ${slick} slick.db.numThreads = 20 - slick.db.maxConnections = 100 + slick.db.maxConnections = 20 slick.db.minConnections = 1 slick.db.connectionTimeout = 1800000 // 30 minutes } @@ -83,7 +83,7 @@ jdbc-read-journal { slick = ${slick} slick.db.numThreads = 20 - slick.db.maxConnections = 100 + slick.db.maxConnections = 20 slick.db.minConnections = 1 slick.db.connectionTimeout = 1800000 // 30 minutes } diff --git a/src/test/resources/postgres-application.conf b/src/test/resources/postgres-application.conf index 71e1d6333..ec4547cd4 100644 --- a/src/test/resources/postgres-application.conf +++ b/src/test/resources/postgres-application.conf @@ -18,7 +18,7 @@ include "docker.conf" jdbc-journal { slick = ${slick} slick.db.numThreads = 10 - slick.db.maxConnections = 30 + slick.db.maxConnections = 10 slick.db.minConnections = 1 slick.db.connectionTimeout = 1800000 // 30 minutes @@ -42,7 +42,7 @@ jdbc-journal { jdbc-snapshot-store { slick = ${slick} slick.db.numThreads = 10 - slick.db.maxConnections = 30 + slick.db.maxConnections = 10 slick.db.minConnections = 1 slick.db.connectionTimeout = 1800000 // 30 minutes } @@ -57,7 +57,7 @@ jdbc-read-journal { slick = ${slick} slick.db.numThreads = 10 - slick.db.maxConnections = 30 + slick.db.maxConnections = 10 slick.db.minConnections = 1 slick.db.connectionTimeout = 1800000 // 30 minutes } diff --git a/src/test/scala/akka/persistence/jdbc/TablesTestSpec.scala b/src/test/scala/akka/persistence/jdbc/TablesTestSpec.scala index 8903a18d9..46e0e3e88 100644 --- a/src/test/scala/akka/persistence/jdbc/TablesTestSpec.scala +++ b/src/test/scala/akka/persistence/jdbc/TablesTestSpec.scala @@ -91,7 +91,7 @@ abstract class TablesTestSpec extends FlatSpec with Matchers { | keepAliveConnection = on // ensures that the database does not get dropped while we are using it | | numThreads = 4 // number of cores - | maxConnections = 10 // 2 * numThreads + 1 (if running on an SSD) + | maxConnections = 4 // same as numThreads | minConnections = 4 // same as numThreads | } | } @@ -151,7 +151,7 @@ abstract class TablesTestSpec extends FlatSpec with Matchers { | keepAliveConnection = on // ensures that the database does not get dropped while we are using it | | numThreads = 4 // number of cores - | maxConnections = 10 // 2 * numThreads + 1 (if running on an SSD) + | maxConnections = 4 // same as numThreads | minConnections = 4 // same as numThreads | } | } @@ -221,7 +221,7 @@ abstract class TablesTestSpec extends FlatSpec with Matchers { | keepAliveConnection = on // ensures that the database does not get dropped while we are using it | | numThreads = 4 // number of cores - | maxConnections = 10 // 2 * numThreads + 1 (if running on an SSD) + | maxConnections = 4 // same as numThreads | minConnections = 4 // same as numThreads | } | } diff --git a/src/test/scala/akka/persistence/jdbc/configuration/AkkaPersistenceConfigTest.scala b/src/test/scala/akka/persistence/jdbc/configuration/AkkaPersistenceConfigTest.scala index 553fde27e..d27968871 100644 --- a/src/test/scala/akka/persistence/jdbc/configuration/AkkaPersistenceConfigTest.scala +++ b/src/test/scala/akka/persistence/jdbc/configuration/AkkaPersistenceConfigTest.scala @@ -82,7 +82,7 @@ class AkkaPersistenceConfigTest extends FlatSpec with Matchers { | keepAliveConnection = on // ensures that the database does not get dropped while we are using it | | numThreads = 4 // number of cores - | maxConnections = 10 // 2 * numThreads + 1 (if running on an SSD) + | maxConnections = 4 // same as numThreads | minConnections = 4 // same as numThreads | } | } @@ -140,7 +140,7 @@ class AkkaPersistenceConfigTest extends FlatSpec with Matchers { | keepAliveConnection = on // ensures that the database does not get dropped while we are using it | | numThreads = 4 // number of cores - | maxConnections = 10 // 2 * numThreads + 1 (if running on an SSD) + | maxConnections = 4 // same as numThreads | minConnections = 4 // same as numThreads | } | } @@ -209,7 +209,7 @@ class AkkaPersistenceConfigTest extends FlatSpec with Matchers { | keepAliveConnection = on // ensures that the database does not get dropped while we are using it | | numThreads = 4 // number of cores - | maxConnections = 10 // 2 * numThreads + 1 (if running on an SSD) + | maxConnections = 4 // same as numThreads | minConnections = 4 // same as numThreads | } | }