From 61d9c3545e283aad9c5671d3dcec9a59ddd8b280 Mon Sep 17 00:00:00 2001 From: John Spray Date: Wed, 7 Feb 2024 13:17:41 +0000 Subject: [PATCH] tests: ignore pg_xact files in comparison --- test_runner/fixtures/neon_fixtures.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/test_runner/fixtures/neon_fixtures.py b/test_runner/fixtures/neon_fixtures.py index bf7c6ccc14..a02e539439 100644 --- a/test_runner/fixtures/neon_fixtures.py +++ b/test_runner/fixtures/neon_fixtures.py @@ -4005,13 +4005,16 @@ def check_restored_datadir_content(test_output_dir: Path, env: NeonEnv, endpoint restored_files = list_files_to_compare(restored_dir_path) + # Exclude pg_xact files from comparison, because postgres does not reliably write + # this out before we reach this point (in spite of our CHECKPOINT above) + # See https://github.com/neondatabase/neon/issues/559 + pgdata_files = list(filter(lambda f: not f.startswith("pg_xact"), pgdata_files)) + restored_files = list(filter(lambda f: not f.startswith("pg_xact"), restored_files)) + if pgdata_files != restored_files: - # filter pg_xact and multixact files which are downloaded on demand - pgdata_files = [ - f - for f in pgdata_files - if not f.startswith("pg_xact") and not f.startswith("pg_multixact") - ] + # filter out files which are downloaded on-demand. This also includes pg_xact, but + # we removed those already. + pgdata_files = [f for f in pgdata_files if not f.startswith("pg_multixact")] # check that file sets are equal assert pgdata_files == restored_files