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

Commitf5c0980

Browse files
committed
try to fix test_archive_replica_null_offset
1 parentcb19d6a commitf5c0980

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

‎tests/helpers/ptrack_helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,8 +1677,8 @@ def switch_wal_segment(self, node, sleep_seconds=1, and_tx=False):
16771677
sleep(sleep_seconds)
16781678

16791679
@contextlib.contextmanager
1680-
defswitch_wal_after(self,node,seconds):
1681-
tm=threading.Timer(seconds,self.switch_wal_segment, [node,0,True])
1680+
defswitch_wal_after(self,node,seconds,and_tx=True):
1681+
tm=threading.Timer(seconds,self.switch_wal_segment, [node,0,and_tx])
16821682
tm.start()
16831683
try:
16841684
yield

‎tests/replica_test.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -751,17 +751,17 @@ def test_archive_replica_null_offset(self):
751751

752752
replica.slow_start(replica=True)
753753

754-
self.switch_wal_segment(master)
755754
self.switch_wal_segment(master)
756755

757-
# take backup from replica
758-
output=self.backup_node(
759-
backup_dir,'node',replica,replica.data_dir,
760-
options=[
761-
'--archive-timeout=30',
762-
'--log-level-console=LOG',
763-
'--no-validate'],
764-
return_id=False)
756+
withself.switch_wal_after(master,10):
757+
# take backup from replica
758+
output=self.backup_node(
759+
backup_dir,'node',replica,replica.data_dir,
760+
options=[
761+
'--archive-timeout=30',
762+
'--log-level-console=LOG',
763+
'--no-validate'],
764+
return_id=False)
765765

766766
self.assertIn(
767767
'LOG: Looking for LSN 0/4000000 in segment: 000000010000000000000003',

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp