diff --git a/tests/bugs/core_4131_test.py b/tests/bugs/core_4131_test.py index b1d293a0..1ce929ee 100644 --- a/tests/bugs/core_4131_test.py +++ b/tests/bugs/core_4131_test.py @@ -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; - 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 + 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' + 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 -