Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4d8b6f5

Browse files
committed
tests: slow_start more robust behaviour
1 parent94d7c4b commit4d8b6f5

File tree

1 file changed

+19
-25
lines changed

1 file changed

+19
-25
lines changed

‎tests/helpers/ptrack_helpers.py

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -118,34 +118,28 @@ def __str__(self):
118118
defslow_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
ifreplica:
128-
self.poll_query_until(
129-
'postgres',
130-
'SELECT pg_is_in_recovery()')
127+
query='SELECT not pg_is_in_recovery()'
131128
else:
132-
whileTrue:
133-
try:
134-
self.poll_query_until(
135-
'postgres',
136-
'SELECT not pg_is_in_recovery()')
137-
break
138-
exceptExceptionase:
139-
continue
129+
query='SELECT pg_is_in_recovery()'
140130

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
131+
self.start()
132+
whileTrue:
133+
try:
134+
self.safe_psql(
135+
'postgres',
136+
query)
137+
break
138+
excepttestgres.QueryExceptionase:
139+
if'database system is starting up'ine[0]:
140+
continue
141+
else:
142+
raisee
149143

150144

151145
classProbackupTest(object):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp