fix(database): keep inbound migration out of live update and restore races

This commit is contained in:
Hamed Sanaei
2026-12-03 03:54:57 +03:30
parent 51f258190f
commit 8cb1e9f1df
9 changed files with 251 additions and 91 deletions
+3 -3
View File
@@ -241,10 +241,10 @@ jobs:
- name: PostgreSQL inbound migration contention
run: |
set -o pipefail
go test ./internal/web/service -run '^TestMigrationRequirementsRejectsLiveNodeMergePostgres$' -count=1 -v | tee /tmp/postgres-inbound-migration.log
go test -p=1 ./internal/database ./internal/web/service -run '^(TestInitDBKeepsRestorePoolPrivate|TestMigrationRequirementsRejectsLiveNodeMergePostgres|TestInboundMigrationAllowsPostgresReaders)$' -count=1 -v | tee /tmp/postgres-inbound-migration.log
passed=$(grep -c -- '^--- PASS' /tmp/postgres-inbound-migration.log || true)
if [ "$passed" -ne 1 ]; then
echo "expected the PostgreSQL inbound migration contention test to pass, got $passed" >&2
if [ "$passed" -ne 3 ]; then
echo "expected 3 passing PostgreSQL inbound migration and restore tests, got $passed" >&2
exit 1
fi