I'm testing the upgrade from SF 2021.1 to SF 2021.2 and I noticed something in the unit tests, there's an assertion message thrown:
Failed: The logic managed to rollback the unit test transaction. Please remove the random rollback statement.
I've discovered that this is caused by the tasks’ “atomic transaction” feature. For example I have a task with a dbo.tsf_send_message ‘some_error’, null, 1 which will call raiserror(), that will cause the task transaction to rollback. But as a side effect the unit test no longer succeeds where it would in previous versions. How can this be fixed?
I also did notice that there is a new “Is empty” assert. Which is nice, but why isn't it converted by default? I've performed this script to correct it:
update t
set t.unit_test_condition = 10 -- Is empty
from unit_test_output_parmtr_overview t
where t.project_id = @project_id
and t.project_vrs_id = @project_vrs_id
and t.expected_output_value is null
and t.unit_test_condition = 0 -- Is equal to