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

Commitcb19d6a

Browse files
committed
fix replica_tests stop_lsn_null_offset
1 parent03e5dce commitcb19d6a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎tests/helpers/ptrack_helpers.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1658,7 +1658,7 @@ def version_to_num(self, version):
16581658
num=num*100+int(re.sub(r"[^\d]","",part))
16591659
returnnum
16601660

1661-
defswitch_wal_segment(self,node,sleep_seconds=1):
1661+
defswitch_wal_segment(self,node,sleep_seconds=1,and_tx=False):
16621662
"""
16631663
Execute pg_switch_wal() in given node
16641664
@@ -1667,7 +1667,8 @@ def switch_wal_segment(self, node, sleep_seconds=1):
16671667
"""
16681668
ifisinstance(node,testgres.PostgresNode):
16691669
withnode.connect('postgres')ascon:
1670-
con.execute('select txid_current()')
1670+
ifand_tx:
1671+
con.execute('select txid_current()')
16711672
con.execute('select pg_switch_wal()')
16721673
else:
16731674
node.execute('select pg_switch_wal()')
@@ -1677,7 +1678,7 @@ def switch_wal_segment(self, node, sleep_seconds=1):
16771678

16781679
@contextlib.contextmanager
16791680
defswitch_wal_after(self,node,seconds):
1680-
tm=threading.Timer(seconds,self.switch_wal_segment, [node,0])
1681+
tm=threading.Timer(seconds,self.switch_wal_segment, [node,0,True])
16811682
tm.start()
16821683
try:
16831684
yield

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp