8000 Added/Updated tests\bugs\core_3419_test.py: Reimplemented: it is enou… · FirebirdSQL/firebird-qa@8a03e76 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8a03e76

Browse files
committed
Added/Updated tests\bugs\core_3419_test.py: Reimplemented: it is enought to check that first lines of error message appear, w/o name of trigger. Checked on 6.0.0.876; 5.0.3.1668; 4.0.6.3214; 3.0.13.33813.
1 parent de4f4fa commit 8a03e76

File tree

1 file changed

+14
-33
lines changed

1 file changed

+14
-33
lines changed

tests/bugs/core_3419_test.py

Lines changed: 14 additions & 33 deletions
10000
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,26 @@
77
DESCRIPTION:
88
JIRA: CORE-3419
99
FBTEST: bugs.core_3419
10+
NOTES:
11+
[27.06.2025] pzotov
12+
Reimplemented: it is enought to check that first lines of error message appear, w/o name of trigger.
13+
14+
Checked on 6.0.0.876; 5.0.3.1668; 4.0.6.3214; 3.0.13.33813.
1015
"""
1116

17+
import locale
1218
import pytest
1319
from firebird.qa import *
1420

1521
db = db_factory()
16-
1722
test_script = """
1823
set autoddl off;
1924
commit;
2025
recreate table test(id int);
2126
commit;
2227
set term ^;
2328
-- This trigger will fire 1001 times before exception raising:
24-
create or alter trigger trg_trans_start
29+
create or alter trigger tx_trg
2530
active on transaction start position 0
2631
as
2732
begin
@@ -34,39 +39,15 @@
3439
set transaction;
3540
"""
3641

37-
act = isql_act('db', test_script, substitutions=[('line: [0-9]+, col: [0-9]+', 'line: , col: ')])
42+
act = isql_act('db', substitutions=[('(-)?At trigger .*', '')])
3843

39-
expected_stderr = """
44+
expected_out = f"""
4045
Statement failed, SQLSTATE = 54001
4146
Too many concurrent executions of the same request
42-
-At trigger 'TRG_TRANS_START' line: 5, col: 9
43-
At trigger 'TRG_TRANS_START' line: 5, col: 9
44-
At trigger 'TRG_TRANS_START' line: 5, col: 9
45-
At trigger 'TRG_TRANS_START' line: 5, col: 9
46-
At trigger 'TRG_TRANS_START' line: 5, col: 9
47-
At trigger 'TRG_TRANS_START' line: 5, col: 9
48-
At trigger 'TRG_TRANS_START' line: 5, col: 9
49-
At trigger 'TRG_TRANS_START' line: 5, col: 9
50-
At trigger 'TRG_TRANS_START' line: 5, col: 9
51-
At trigger 'TRG_TRANS_START' line: 5, col: 9
52-
At trigger 'TRG_TRANS_START' line: 5, col: 9
53-
At trigger 'TRG_TRANS_START' line: 5, col: 9
54-
At trigger 'TRG_TRANS_START' line: 5, col: 9
55-
At trigger 'TRG_TRANS_START' line: 5, col: 9
56-
At trigger 'TRG_TRANS_START' line: 5, col: 9
57-
At trigger 'TRG_TRANS_START' line: 5, col: 9
58-
At trigger 'TRG_TRANS_START' line: 5, col: 9
59-
At trigger 'TRG_TRANS_START' line: 5, col: 9
60-
At trigger 'TRG_TRANS_START' line: 5, col: 9
61-
At trigger 'TRG_TRANS_START' line: 5, col: 9
62-
At trigger 'TRG_TRANS_START' line: 5, col: 9
63-
At trigger 'TRG_TRANS_START' line: 5, col: 9
64-
At trigger 'TRG_TRANS_START' ...
6547
"""
6648

67-
@pytest.mark.version('>=3')
68-
def test_1(act: Action):
69-
act.expected_stderr = expected_stderr
70-
act.execute(charset='utf8')
71-
assert act.clean_stderr == act.clean_expected_stderr
72-
49+
@pytest.mark.version('>=3.0')
50+
def test_2(act: Action):
51+
act.expected_stdout = expected_out
52+
act.isql(switches=['-q'], input = test_script, combine_output = True)
53+
assert act.clean_stdout == act.clean_expected_stdout

0 commit comments

Comments
 (0)
0