From 1ff4999b74c2eb77603d554daf99a8820d8e47a4 Mon Sep 17 00:00:00 2001 From: Dmitriy Paunin Date: Sat, 26 Oct 2019 17:03:19 +0800 Subject: [PATCH] Fix the test --- tests/pgsql-split-brain-isolated-standby/run.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/pgsql-split-brain-isolated-standby/run.sh b/tests/pgsql-split-brain-isolated-standby/run.sh index db138f96..c0f9d6c5 100755 --- a/tests/pgsql-split-brain-isolated-standby/run.sh +++ b/tests/pgsql-split-brain-isolated-standby/run.sh @@ -10,10 +10,8 @@ echo ">>> Isolating pgslave3..." docker-compose exec pgslave3 bash -c "echo 1.1.1.1 pgmaster >> /etc/hosts && echo 1.1.1.2 pgslave1 >> /etc/hosts" sleep 60 -SLAVE_EXIT=`docker-compose ps | grep pgslave3 | grep Exit | wc -l | tr -d ' '` +SLAVE_EXIT=`docker-compose logs pgslave3 | tail -n5 | grep 'repmgrd terminating...' | wc -l | tr -d ' '` if [[ "$SLAVE_EXIT" != "1" ]]; then - docker-compose ps - docker-compose logs pgslave3 echo '>>> Isolated slave should die!'; exit 1 fi