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

Commitfa99438

Browse files
author
v.shepard
committed
PBCKP-152 - test_restore_target_time cut
1 parent0c26f77 commitfa99438

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎testgres/node.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ def get_control_data(self):
659659

660660
returnout_dict
661661

662-
defslow_start(self,replica=False,dbname='template1',username=default_username()):
662+
defslow_start(self,replica=False,dbname='template1',username=default_username(),max_attempts=0):
663663
"""
664664
Starts the PostgreSQL instance and then polls the instance
665665
until it reaches the expected state (primary or replica). The state is checked
@@ -670,6 +670,7 @@ def slow_start(self, replica=False, dbname='template1', username=default_usernam
670670
username:
671671
replica: If True, waits for the instance to be in recovery (i.e., replica mode).
672672
If False, waits for the instance to be in primary mode. Default is False.
673+
max_attempts:
673674
"""
674675
self.start()
675676

@@ -684,7 +685,8 @@ def slow_start(self, replica=False, dbname='template1', username=default_usernam
684685
suppress={InternalError,
685686
QueryException,
686687
ProgrammingError,
687-
OperationalError})
688+
OperationalError},
689+
max_attempts=max_attempts)
688690

689691
defstart(self,params=[],wait=True):
690692
"""
@@ -719,7 +721,7 @@ def start(self, params=[], wait=True):
719721
msg='Cannot start node'
720722
files=self._collect_special_files()
721723
raise_from(StartNodeException(msg,files),e)
722-
724+
print("Node started")
723725
self._maybe_start_logger()
724726
self.is_started=True
725727
returnself
@@ -1139,9 +1141,9 @@ def poll_query_until(self,
11391141
# sanity checks
11401142
assertmax_attempts>=0
11411143
assertsleep_time>0
1142-
11431144
attempts=0
11441145
whilemax_attempts==0orattempts<max_attempts:
1146+
print(f"Pooling{attempts}")
11451147
try:
11461148
res=self.execute(dbname=dbname,
11471149
query=query,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp