2021-04-26 20:07:00 +02:00
|
|
|
#coding:utf-8
|
|
|
|
#
|
|
|
|
# id: bugs.core_2268
|
|
|
|
# title: GFIX causes BUGCHECK errors with non valid transaction numbers
|
2021-11-15 19:01:46 +01:00
|
|
|
# decription:
|
2021-04-26 20:07:00 +02:00
|
|
|
# tracker_id: CORE-2268
|
|
|
|
# min_versions: []
|
|
|
|
# versions: 2.5
|
|
|
|
# qmid: None
|
|
|
|
|
|
|
|
import pytest
|
2021-11-15 19:01:46 +01:00
|
|
|
from firebird.qa import db_factory, python_act, Action
|
2021-04-26 20:07:00 +02:00
|
|
|
|
|
|
|
# version: 2.5
|
|
|
|
# resources: None
|
|
|
|
|
|
|
|
substitutions_1 = [('^failed to reconnect to a transaction in database.*', '')]
|
|
|
|
|
|
|
|
init_script_1 = """"""
|
|
|
|
|
|
|
|
db_1 = db_factory(page_size=4096, sql_dialect=3, init=init_script_1)
|
|
|
|
|
|
|
|
# test_script_1
|
|
|
|
#---
|
|
|
|
# runProgram('gfix',['-user',user_name,'-pas',user_password,'-commit','1000000',dsn])
|
2021-11-15 19:01:46 +01:00
|
|
|
#
|
2021-04-26 20:07:00 +02:00
|
|
|
#---
|
2021-11-15 19:01:46 +01:00
|
|
|
|
|
|
|
act_1 = python_act('db_1', substitutions=substitutions_1)
|
2021-04-26 20:07:00 +02:00
|
|
|
|
|
|
|
expected_stderr_1 = """transaction is not in limbo
|
|
|
|
-transaction 1000000 is in an ill-defined state
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
@pytest.mark.version('>=2.5')
|
2021-11-15 19:01:46 +01:00
|
|
|
def test_1(act_1: Action):
|
|
|
|
act_1.expected_stderr = expected_stderr_1
|
|
|
|
act_1.gfix(switches=['-commit', '1000000', act_1.db.dsn])
|
|
|
|
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
2021-04-26 20:07:00 +02:00
|
|
|
|
|
|
|
|