Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect deep merge of suites with has_children = false #194

Open
mrbinwin opened this issue Aug 16, 2021 · 0 comments
Open

Incorrect deep merge of suites with has_children = false #194

mrbinwin opened this issue Aug 16, 2021 · 0 comments

Comments

@mrbinwin
Copy link

mrbinwin commented Aug 16, 2021

Hello!

service-api v. 5.4.0

There is a bug in merge_launch() function that leads to incorrect deep merge of suites (from different launches) that have the same name but one of them have no children (test_item.has_children = false).

test_item 1:

item_id unique_id name path has_children parent_id launch_id
5253296 auto:85f69a4c071c3d073d354f31bc82e6a4 Root User Story 5253296 false 261773

test_item 2:

item_id unique_id name path has_children parent_id launch_id
23471137 auto:85f69a4c071c3d073d354f31bc82e6a4 Root User Story 23471137 true 599388

We run a deep merge of their launches: 261773 and 599388

Actual result:

test_item after merge:

item_id unique_id name path has_children parent_id launch_id
31452655 auto:26204e06d9f9326dd60f05075c3fc258 Root User Story 31452655 false 638339

1

The result test_item.has_children = false
Also rows related to new launch and this test_item have not been inserted to statistics table.
So users are unable to see test results of this launch on UI.

It happens because this condition is false: https://github.com/reportportal/migrations/blob/develop/migrations/25_deep_merge_nested_steps_path_fix.up.sql#L70

Expected result:
If one of merging test_items has children test_items and has_children=true,
the result test_item also must have has_children=true and related statistics (total, passed, failed...) must be inserted into statistics table

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant