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:
JIRA: 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
@ -20,27 +27,26 @@ test_script = """
insert into test values('qwerty');
commit;
set list on;
set plan on;
set term ^;
execute block as
declare rn int;
declare x type of column test.x;
begin
select row_number() over(order by x) as rn, x
from test
where x = 'qwerty'
;
-- 3.0.0.30472:
-- cursor identified in the UPDATE or DELETE statement is not positioned on a row. no current record for fetch operation
into rn, x;
end ^
set term ;^
"""
act = isql_act('db', test_script)
expected_stdout = """
PLAN SORT (TEST INDEX (TEST_X))
RN 1
X qwerty
"""
expected_stdout = ""
@pytest.mark.version('>=3.0')
def test_1(act: Action):
act.expected_stdout = expected_stdout
act.execute()
act.execute(combine_output = True)
assert act.clean_stdout == act.clean_expected_stdout