Skip to content

Commit 0fded61

Browse files
committed
Merge branch 'master' into remote_ssh
2 parents d6908b3 + 58cd26f commit 0fded61

File tree

1 file changed

+16
-24
lines changed

1 file changed

+16
-24
lines changed

tests/helpers/ptrack_helpers.py

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -118,34 +118,26 @@ def __str__(self):
118118
def slow_start(self, replica=False):
119119

120120
# wait for https://github.com/postgrespro/testgres/pull/50
121-
# self.poll_query_until(
122-
# "postgres",
123-
# "SELECT not pg_is_in_recovery()",
124-
# raise_operational_error=False)
125-
126-
self.start()
121+
# self.start()
122+
# self.poll_query_until(
123+
# "postgres",
124+
# "SELECT not pg_is_in_recovery()",
125+
# suppress={testgres.NodeConnection})
127126
if replica:
128-
self.poll_query_until(
129-
'postgres',
130-
'SELECT pg_is_in_recovery()')
127+
query = 'SELECT pg_is_in_recovery()'
131128
else:
132-
while True:
133-
try:
134-
self.poll_query_until(
135-
'postgres',
136-
'SELECT not pg_is_in_recovery()')
129+
query = 'SELECT not pg_is_in_recovery()'
130+
131+
self.start()
132+
while True:
133+
try:
134+
if self.safe_psql('postgres', query) == 't\n':
137135
break
138-
except Exception as e:
136+
except testgres.QueryException as e:
137+
if 'database system is starting up' in e[0]:
139138
continue
140-
141-
# while True:
142-
# try:
143-
# self.poll_query_until(
144-
# "postgres",
145-
# "SELECT pg_is_in_recovery()")
146-
# break
147-
# except ProbackupException as e:
148-
# continue
139+
else:
140+
raise e
149141

150142

151143
class ProbackupTest(object):

0 commit comments

Comments
 (0)