zonkyio / embedded-database-spring-test

A library for creating isolated embedded databases for Spring-powered integration tests.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple PostgreSQL clusters (instances)

mkleczek opened this issue · comments

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.

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.