mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-01-22 13:33:07 +01:00
Added/Updated tests\functional\replication\test_shutdown_during_applying_segments_leads_to_crash.py: Make final SWEEP optional, depending on setting RUN_SWEEP_AT_END - see $QA_ROOT/files/test_config.ini.
This commit is contained in:
parent
05179ec97b
commit
52a42f9541
@ -34,14 +34,14 @@ DESCRIPTION:
|
||||
The only difference in metadata must be 'CREATE DATABASE' statement with different DB names - we suppress it,
|
||||
thus metadata difference must not be issued.
|
||||
|
||||
FBTEST: tests.functional.replication.shutdown_during_applying_segments_leads_to_crash
|
||||
NOTES:
|
||||
Confirmed bug on 5.0.0.215: server crashed, firebird.log contains message:
|
||||
"Fatal lock manager error: invalid lock id (0), errno: 0".
|
||||
Validation of replica DB shows lot of orphan pages (but no errors).
|
||||
|
||||
This is the same bug as described in the ticked (discussed with dimitr, letters 22.09.2021).
|
||||
|
||||
FBTEST: tests.functional.replication.shutdown_during_applying_segments_leads_to_crash
|
||||
NOTES:
|
||||
[27.08.2022] pzotov
|
||||
Warning raises on Windows and Linux:
|
||||
../../../usr/local/lib/python3.9/site-packages/_pytest/config/__init__.py:1126
|
||||
@ -78,6 +78,9 @@ NOTES:
|
||||
Because of this, attempt to drop this file exactly at that moment causes on Windows "PermissionError: [WinError 32]".
|
||||
This error must NOT propagate and interrupt entire test. Rather, we must only to log name of file that can not be dropped.
|
||||
|
||||
[23.11.2023] pzotov
|
||||
Make final SWEEP optional, depending on setting RUN_SWEEP_AT_END - see $QA_ROOT/files/test_config.ini.
|
||||
|
||||
Checked on Windows, 6.0.0.193, 5.0.0.1304, 4.0.5.3042 (SS/CS for all).
|
||||
"""
|
||||
import os
|
||||
@ -105,6 +108,7 @@ REPLICA_TIMEOUT_FOR_ERROR = int(repl_settings['replica_timeout_for_error'])
|
||||
|
||||
MAIN_DB_ALIAS = repl_settings['main_db_alias']
|
||||
REPL_DB_ALIAS = repl_settings['repl_db_alias']
|
||||
RUN_SWEEP_AT_END = int(repl_settings['run_sweep_at_end'])
|
||||
|
||||
db_main = db_factory( filename = '#' + MAIN_DB_ALIAS, do_not_create = True, do_not_drop = True)
|
||||
db_repl = db_factory( filename = '#' + REPL_DB_ALIAS, do_not_create = True, do_not_drop = True)
|
||||
@ -356,13 +360,15 @@ def drop_db_objects(act_db_main: Action, act_db_repl: Action, capsys):
|
||||
else:
|
||||
db_repl_meta = a.extract_meta(charset = 'utf8', io_enc = 'utf8')
|
||||
|
||||
######################
|
||||
### A C H T U N G ###
|
||||
######################
|
||||
# MANDATORY, OTHERWISE REPLICATION GETS STUCK ON SECOND RUN OF THIS TEST
|
||||
# WITH 'ERROR: Record format with length NN is not found for table TEST':
|
||||
a.gfix(switches=['-sweep', a.db.dsn])
|
||||
|
||||
if RUN_SWEEP_AT_END:
|
||||
# Following sweep was mandatory during 2021...2022. Problem was fixed:
|
||||
# * for FB 4.x: 26-jan-2023, commit 2ed48a62c60c029cd8cb2b0c914f23e1cb56580a
|
||||
# * for FB 5.x: 20-apr-2023, commit 5af209a952bd2ec3723d2c788f2defa6b740ff69
|
||||
# (log message: 'Avoid random generation of field IDs, respect the user-specified order instead').
|
||||
# Until this problem was solved, subsequent runs of this test caused to fail with:
|
||||
# 'ERROR: Record format with length NN is not found for table TEST'
|
||||
#
|
||||
a.gfix(switches=['-sweep', a.db.dsn])
|
||||
|
||||
# Final point: metadata must become equal:
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user