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

Added/Updated tests\bugs\core_4131_test.py: Enclose query in execute block so that no output will be if it completes successfully.

This commit is contained in:
pavel-zotov 2023-07-29 21:30:16 +03:00
parent a1e3da0865
commit a479c5339e

View File

@ -7,6 +7,13 @@ TITLE: Error when processing an empty data set by window function, if read
DESCRIPTION: DESCRIPTION:
JIRA: CORE-4131 JIRA: CORE-4131
FBTEST: bugs.core_4131 FBTEST: bugs.core_4131
NOTES:
3.0.0.30472:
cursor identified in the UPDATE or DELETE statement is not positioned on a row. no current record for fetch operation
[29.07.2023] pzotov
Enclose query in execute block so that no output will be if it completes successfully.
Previous version of test issued execution plan which had no relation to test purpose and could be changed (thus caused test to be failed).
""" """
import pytest import pytest
@ -20,27 +27,26 @@ test_script = """
insert into test values('qwerty'); insert into test values('qwerty');
commit; commit;
set list on; set term ^;
set plan on; execute block as
select row_number() over(order by x) as rn, x declare rn int;
from test declare x type of column test.x;
where x = 'qwerty' begin
; select row_number() over(order by x) as rn, x
-- 3.0.0.30472: from test
-- cursor identified in the UPDATE or DELETE statement is not positioned on a row. no current record for fetch operation where x = 'qwerty'
into rn, x;
end ^
set term ;^
""" """
act = isql_act('db', test_script) act = isql_act('db', test_script)
expected_stdout = """ expected_stdout = ""
PLAN SORT (TEST INDEX (TEST_X))
RN 1
X qwerty
"""
@pytest.mark.version('>=3.0') @pytest.mark.version('>=3.0')
def test_1(act: Action): def test_1(act: Action):
act.expected_stdout = expected_stdout act.expected_stdout = expected_stdout
act.execute() act.execute(combine_output = True)
assert act.clean_stdout == act.clean_expected_stdout assert act.clean_stdout == act.clean_expected_stdout