6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-23 14:03:06 +01:00
firebird-qa/tests/bugs/core_2115_test.py

31 lines
802 B
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-21 18:49:26 +01:00
"""
ID: issue-2548
ISSUE: 2548
TITLE: Query plan is missing for the long query
DESCRIPTION:
JIRA: CORE-2115
FBTEST: bugs.core_2115
2022-01-21 18:49:26 +01:00
"""
2021-04-26 20:07:00 +02:00
import pytest
2021-11-12 18:29:54 +01:00
from zipfile import Path
2022-01-21 18:49:26 +01:00
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-21 18:49:26 +01:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-21 18:49:26 +01:00
act = python_act('db')
2021-04-26 20:07:00 +02:00
@pytest.mark.version('>=3.0')
2022-01-21 18:49:26 +01:00
def test_1(act: Action):
2021-11-12 18:29:54 +01:00
# Read script and expected stdout from zip file
2022-01-21 18:49:26 +01:00
datafile = Path(act.files_dir / 'core_2115.zip',
2021-11-12 18:29:54 +01:00
at='tmp_core_2115_queries_with_long_plans.sql')
2022-01-21 18:49:26 +01:00
act.script = datafile.read_text()
datafile = Path(act.files_dir / 'core_2115.zip',
2021-11-12 18:29:54 +01:00
at='tmp_core_2115_check_txt_of_long_plans.log')
2022-01-21 18:49:26 +01:00
act.expected_stdout = datafile.read_text()
act.execute()
assert act.clean_stdout == act.clean_expected_stdout