Skip to content

Commit b3205bc

Browse files
committed
2
1 parent 8a95206 commit b3205bc

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.github/workflows/spockbench.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
cd ${GITHUB_WORKSPACE}/tests/docker/
6060
echo PG_VER=${{ matrix.pgver }} >> pgedge.env
6161
env BASE_IMAGE=ghcr.io/pgedge/base-test-image:latest \
62-
docker compose up --wait -d
62+
docker compose up --build --wait -d
6363
timeout-minutes: 20
6464

6565
- name: Run tests on all nodes

tests/docker/entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,15 @@ track_commit_timestamp = 'on'
6363
max_worker_processes = 32
6464
max_replication_slots = 32
6565
max_wal_senders = 32
66-
log_min_messages = debug5
66+
log_min_messages = log
6767
6868
# Network configuration for multi-node cluster
6969
listen_addresses = '*'
7070
7171
# Spock Configuration
7272
shared_preload_libraries = 'spock'
7373
spock.conflict_resolution = 'last_update_wins'
74+
spock.save_resolutions = 'on'
7475
EOF
7576

7677
# Configure client authentication for Docker network

tests/docker/run-tests.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,13 @@ _EOF_
9090
SELECT spock.wait_slot_confirm_lsn(NULL, NULL);
9191
_EOF_
9292

93-
echo "Waiting for apply worker timeouts..."
94-
sleep 5
93+
# To be sure that conflict resolution has happened we need to wait until the
94+
# following transaction arrives
95+
lsn1=$(psql -A -t -h /tmp -c "SELECT spock.sync_event()")
96+
echo "Wait until XLogRecord $lsn1 arrive and applies from $HOSTNAME to ${peer_names[0]}"
97+
psql -A -t -h ${peer_names[0]} -c \
98+
"CALL spock.wait_for_sync_event(true, '$HOSTNAME', '$lsn1'::pg_lsn, 30)"
99+
95100
echo "Checking the exception table now..."
96101
elog_entries=$(psql -A -t -h ${peer_names[0]} -c "
97102
SELECT count(*)

0 commit comments

Comments
 (0)