File tree Expand file tree Collapse file tree 1 file changed +19
-25
lines changed Expand file tree Collapse file tree 1 file changed +19
-25
lines changed Original file line number Diff line number Diff line change @@ -118,34 +118,28 @@ def __str__(self):
118
118
def slow_start (self , replica = False ):
119
119
120
120
# 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})
127
126
if replica :
128
- self .poll_query_until (
129
- 'postgres' ,
130
- 'SELECT pg_is_in_recovery()' )
127
+ query = 'SELECT not pg_is_in_recovery()'
131
128
else :
132
- while True :
133
- try :
134
- self .poll_query_until (
135
- 'postgres' ,
136
- 'SELECT not pg_is_in_recovery()' )
137
- break
138
- except Exception as e :
139
- continue
129
+ query = 'SELECT pg_is_in_recovery()'
140
130
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
+ while True :
133
+ try :
134
+ self .safe_psql (
135
+
6EBF
'postgres' ,
136
+ query )
137
+ break
138
+ except testgres .QueryException as e :
139
+ if 'database system is starting up' in e [0 ]:
140
+ continue
141
+ else :
142
+ raise e
149
143
150
144
151
145
class ProbackupTest (object ):
You can’t perform that action at this time.
0 commit comments