From 0056561f8cd06afc035fbddf55dd16c59997d29f Mon Sep 17 00:00:00 2001 From: pavel-zotov Date: Wed, 13 Dec 2023 12:53:06 +0300 Subject: [PATCH] Added/Updated tests\bugs\core_5295_test.py: see notes --- tests/bugs/core_5295_test.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/bugs/core_5295_test.py b/tests/bugs/core_5295_test.py index d91a64d7..dc81f930 100644 --- a/tests/bugs/core_5295_test.py +++ b/tests/bugs/core_5295_test.py @@ -7,6 +7,11 @@ TITLE: Validation could read after the end-of-file when handle multifile d DESCRIPTION: JIRA: CORE-5295 FBTEST: bugs.core_5295 +NOTES: + [13.12.2023] pzotov + Adjusted substitutions: runtime error must not be filtered out by '?!(...)' pattern + ("negative lookahead assertion", see https://docs.python.org/3/library/re.html#regular-expression-syntax). + Added 'combine_output = True' in order to see error messages produced by 'gfix -v' """ import pytest @@ -15,7 +20,7 @@ from firebird.qa import * db = db_factory(from_backup='core5295.fbk') -act = python_act('db', substitutions=[('\t+', ' '), ('^((?!checked_size|Error|error).)*$', '')]) +act = python_act('db', substitutions=[('[ \t]+', ' '), ('^((?!checked_size|[Ee]rror|[Rr]eached).)*$', '')]) fbk_file = temp_file('tmp_core_5295.fbk') fdb_file_1 = temp_file('tmp_core_5295-1.fdb') @@ -30,6 +35,7 @@ def test_1(act: Action, fbk_file: Path, fdb_file_1: Path, fdb_file_2: Path): database=[fdb_file_1, fdb_file_2], db_file_pages=[100000]) srv.wait() + # Only 'gfix -v' raised error. Online validation works fine: - act.gfix(switches=['-v', act.get_dsn(fdb_file_1)]) + act.gfix(switches=['-v', act.get_dsn(fdb_file_1)], combine_output = True) assert act.clean_stdout == act.clean_expected_stdout