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_1249_test.py

30 lines
864 B
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-19 17:54:56 +01:00
"""
ID: issue-1673
ISSUE: 1673
TITLE: Full shutdown mode doesn't work on Classic if there are other connections to the database
DESCRIPTION:
JIRA: CORE-1249
FBTEST: bugs.core_1249
2022-01-19 17:54:56 +01:00
"""
2021-04-26 20:07:00 +02:00
import pytest
2022-01-19 17:54:56 +01:00
from firebird.qa import *
2021-11-11 18:01:08 +01:00
from firebird.driver import ShutdownMode, ShutdownMethod, DatabaseError
2021-04-26 20:07:00 +02:00
2022-01-19 17:54:56 +01:00
db = db_factory()
2021-04-26 20:07:00 +02:00
2022-01-19 17:54:56 +01:00
act = python_act('db')
2021-04-26 20:07:00 +02:00
2022-01-19 17:54:56 +01:00
@pytest.mark.version('>=3')
def test_1(act: Action):
with act.connect_server() as srv, act.db.connect() as con:
srv.database.shutdown(database=act.db.db_path, mode=ShutdownMode.FULL,
2021-11-11 18:01:08 +01:00
method=ShutdownMethod.FORCED, timeout=0)
c = con.cursor()
with pytest.raises(DatabaseError, match='.*shutdown'):
c.execute('select 1 from rdb$database')
#
2022-01-19 17:54:56 +01:00
srv.database.bring_online(database=act.db.db_path)