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

Commitfa29020

Browse files
committed
[PBCKP-423] and backport cleanup_ptrack for test_archive_push_sanity
1 parent22bdbb3 commitfa29020

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

‎tests/archive_test.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2013,7 +2013,7 @@ def test_archive_push_sanity(self):
20132013
self.backup_node(backup_dir,'node',node)
20142014

20152015
withopen(os.path.join(node.logs_dir,'postgresql.log'),'r')asf:
2016-
postgres_log_content=f.read()
2016+
postgres_log_content=cleanup_ptrack(f.read())
20172017

20182018
# print(postgres_log_content)
20192019
# make sure that .backup file is not compressed
@@ -2056,7 +2056,7 @@ def test_archive_push_sanity(self):
20562056
replica.stop()
20572057
log.wait_shutdown()
20582058

2059-
self.assertNotIn('WARNING',log.content)
2059+
self.assertNotIn('WARNING',cleanup_ptrack(log.content))
20602060

20612061
output=self.show_archive(
20622062
backup_dir,'node',as_json=False,as_text=True,
@@ -2662,6 +2662,17 @@ def test_archive_empty_history_file(self):
26622662
'WARNING: History file is corrupted or missing: "{0}"'.format(os.path.join(wal_dir,'00000004.history')),
26632663
log_content)
26642664

2665+
2666+
defcleanup_ptrack(log_content):
2667+
# PBCKP-423 - need to clean ptrack warning
2668+
ptrack_is_not='Ptrack 1.X is not supported anymore'
2669+
ifptrack_is_notinlog_content:
2670+
lines= [lineforlineinlog_content.splitlines()
2671+
ifptrack_is_notnotinline]
2672+
log_content="".join(lines)
2673+
returnlog_content
2674+
2675+
26652676
# TODO test with multiple not archived segments.
26662677
# TODO corrupted file in archive.
26672678

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp