6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 13:33:07 +01:00
firebird-qa/tests/bugs/core_5433_test.py

38 lines
1.2 KiB
Python
Raw Permalink Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-25 22:55:48 +01:00
"""
ID: issue-5705
ISSUE: 5705
TITLE: Minor performance optimization - avoid additional database attachment from security objects mapping code
DESCRIPTION:
After discuss with Alex (letters 08-10 mar 2017) it was decided to estimate effect of optimization
by evaluating difference of attachment_id between two subsequent connections to DB.
NB: Alex said that there was no way to see special service attachment because is was made with turned off
ability to trace it (see letter 09-mar-2017 16:16).
SuperServer will have diff=3 (THREE) attachment_id because of CacheWriter and GarbageCollector.
For that reason we detect FB architecture here and SKIP checking SS results by substitution of
dummy "OK" instead.
JIRA: CORE-5433
FBTEST: bugs.core_5433
2022-01-25 22:55:48 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-25 22:55:48 +01:00
act = python_act('db')
2021-04-26 20:07:00 +02:00
@pytest.mark.version('>=4.0')
2022-01-25 22:55:48 +01:00
def test_1(act: Action):
if act.get_server_architecture() in ['Classic', 'SuperClassic']:
with act.db.connect() as con:
att1 = con.info.id
2022-01-25 22:55:48 +01:00
with act.db.connect() as con:
att2 = con.info.id
assert att2 - att1 == 1
2022-01-25 22:55:48 +01:00
else:
pytest.skip('Applies only to Classic and SuperClassic')