Skip to content

Commit 1eb5226

Browse files
committed
Increase max connections for postgres container as it can run out of connections during integration tests, also use half of the default pool size to prevent exhausting the connections
1 parent 0967ae2 commit 1eb5226

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

build/ci/docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ services:
2424
postgres:
2525
container_name: postgres
2626
image: postgis/postgis:18-3.6
27+
command:
28+
- "-c"
29+
- "max_connections=200"
2730
environment:
2831
TZ: Europe/Amsterdam
2932
POSTGRES_USER: tailormap

src/test/resources/application-postgresql.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ tailormap-api.prometheus-api-appmetrics-layer-switched-on-updated=time()-max_ove
2424
spring.datasource.url=jdbc:postgresql:tailormap
2525
spring.datasource.username=tailormap
2626
spring.datasource.password=tailormap
27+
# half of the default value of 10, to prevent too many connections in integration tests
28+
spring.datasource.hikari.maximum-pool-size=5
2729
spring.jpa.open-in-view=false
2830
spring.jpa.properties.hibernate.use_sql_comments=true
2931

0 commit comments

Comments
 (0)