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

Commitab2d595

Browse files
committed
tests: fixes
1 parent05d8ecc commitab2d595

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

‎tests/archive.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -256,15 +256,16 @@ def test_pgpro434_3(self):
256256
withopen(log_file,'r')asf:
257257
log_content=f.read()
258258

259-
self.assertIn(
260-
"ERROR: Switched WAL segment 000000010000000000000002 "
261-
"could not be archived in 60 seconds",
262-
log_content)
263-
264-
self.assertIn(
265-
"ERROR: Switched WAL segment 000000010000000000000002 "
266-
"could not be archived in 60 seconds",
267-
log_content)
259+
# in PG =< 9.6 pg_stop_backup always wait
260+
ifself.get_version(node)<100000:
261+
self.assertIn(
262+
"ERROR: pg_stop_backup doesn't answer in 60 seconds, cancel it",
263+
log_content)
264+
else:
265+
self.assertIn(
266+
"ERROR: Switched WAL segment 000000010000000000000002 "
267+
"could not be archived in 60 seconds",
268+
log_content)
268269

269270
log_file=os.path.join(node.logs_dir,'postgresql.log')
270271
withopen(log_file,'r')asf:

‎tests/merge.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,8 +1540,8 @@ def test_crash_after_opening_backup_control_2(self):
15401540
gdb.set_breakpoint('write_backup_filelist')
15411541
gdb.run_until_break()
15421542

1543-
gdb.set_breakpoint('print_file_list')
1544-
gdb.continue_execution_until_break()
1543+
gdb.set_breakpoint('fio_fwrite')
1544+
gdb.continue_execution_until_break(2)
15451545

15461546
gdb._execute('signal SIGKILL')
15471547

@@ -1631,9 +1631,11 @@ def test_losing_file_after_failed_merge(self):
16311631
gdb.set_breakpoint('write_backup_filelist')
16321632
gdb.run_until_break()
16331633

1634-
gdb.set_breakpoint('print_file_list')
1634+
gdb.set_breakpoint('fio_fwrite')
16351635
gdb.continue_execution_until_break()
16361636

1637+
gdb._execute('bt')
1638+
16371639
gdb._execute('signal SIGKILL')
16381640

16391641
print(self.show_pb(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp