zonkyio / embedded-database-spring-test

A library for creating isolated embedded databases for Spring-powered integration tests.
Apache License 2.0
412 stars 37 forks source link

Multiple PostgreSQL clusters (instances) #254

Closed mkleczek closed 11 months ago

mkleczek commented 11 months ago

First of all - thanks for an amazing library - we use it extensively internally.

One issue we are struggling right now is - how to set up multiple PostgreSQL instances to test our replication/sharding/ha logic. Unfortunately we cannot simulate it using multiple databases in a single Pg cluster.

tomix26 commented 10 months ago

Hey @mkleczek, could you please share with us how you overcame this issue? Using different zonky.test.database.postgres.server.properties.* settings should result in starting multiple independent postgres clusters, and maybe it could be possible to enable replication/sharding/ha logic among such clusters, but I've never used it in such way.