mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-01-22 21:43:06 +01:00
Added/Updated bugs\core_5087_test.py. Changed search through pattern list, see 'act.match_any(line, allowed_patterns)'. Added comments. Checked on Windows and Linux: 3.0.8.33535 (SS/CS), 4.0.1.2692 (SS/CS), 5.0.0.730
This commit is contained in:
parent
df72251572
commit
14a3d8337f
@ -31,6 +31,13 @@ DESCRIPTION:
|
|||||||
We also do additional check: all ISQL sessions should be disconnected with writing to logs appropriate messages about shutdown.
|
We also do additional check: all ISQL sessions should be disconnected with writing to logs appropriate messages about shutdown.
|
||||||
JIRA: CORE-5087
|
JIRA: CORE-5087
|
||||||
FBTEST: bugs.core_5087
|
FBTEST: bugs.core_5087
|
||||||
|
NOTES:
|
||||||
|
[14.09.2022] pzotov
|
||||||
|
NB: ticket was created at 28-jan-2016 after testing on LI-V3.0.0.32294 (Release Candidate 1).
|
||||||
|
QA suite can not run with such too old snapshot and fails with:
|
||||||
|
firebird.driver.types.DatabaseError: invalid format for transaction parameter block
|
||||||
|
wrong version of transaction parameter block
|
||||||
|
Checked on Linux and Windows: 3.0.8.33535 (SS/CS), 4.0.1.2692 (SS/CS), 5.0.0.591
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
@ -298,9 +305,15 @@ def test_1(act: Action, db_dml_sessions: Database, dml_logs: List[Path],
|
|||||||
re.compile('Error writing data',re.IGNORECASE)
|
re.compile('Error writing data',re.IGNORECASE)
|
||||||
]
|
]
|
||||||
for line in unified_diff(log_before, log_after):
|
for line in unified_diff(log_before, log_after):
|
||||||
if line.startswith('+'):
|
# ::: NB :::
|
||||||
if filter(None, [p.search(line) for p in allowed_patterns]):
|
# filter(None, [p.search(line) for p in allowed_patterns]) will be None only in Python 2.7.x!
|
||||||
f_check_log.write(f'Crash message in firebird.log detected: {line.upper()}\n')
|
# In Python 3.x this will retrun "<filter object at 0xNNNNN>" ==> we must NOT use this statement!
|
||||||
|
if line.startswith('+') and act.match_any(line, allowed_patterns):
|
||||||
|
f_check_log.write(f'Crash message in firebird.log detected: {line.upper()}\n')
|
||||||
|
# !! DOES NOT WORK IN Python 3.x !!
|
||||||
|
# if filter(None, [p.search(line) for p in allowed_patterns]):
|
||||||
|
# f_check_log.write(f'Crash message in firebird.log detected: {line.upper()}\n')
|
||||||
|
|
||||||
# Final check
|
# Final check
|
||||||
act.expected_stdout = expected_stdout
|
act.expected_stdout = expected_stdout
|
||||||
act.stdout = check_log.read_text()
|
act.stdout = check_log.read_text()
|
||||||
|
Loading…
Reference in New Issue
Block a user