Skip to content
Snippets Groups Projects
Commit ad0d820d authored by Heinrich Lee Yu's avatar Heinrich Lee Yu
Browse files

Merge branch 'jp-fix-epicspec' into 'master'

Fix failing epics finder spec

See merge request !87875
parents 16e3dd3f 6e6790a1
No related branches found
No related tags found
1 merge request!87875Fix failing epics finder spec
Pipeline #541957232 passed with warnings
Pipeline: GitLab

#541979199

    ......@@ -344,11 +344,17 @@ def epics(params = {})
    GroupMember.where(user_id: search_user.id).delete_all
    group.add_guest(search_user)
    epics.to_a # cache warm up
    ::Gitlab::SafeRequestStore.clear!
    control = ActiveRecord::QueryRecorder.new(skip_cached: false) { epics.to_a }
    create_list(:group, 5, :private, parent: group)
    ::Gitlab::SafeRequestStore.clear!
    expect { epics.to_a }.not_to exceed_all_query_limit(control)
    # there is still N+1 to check access for each sub-group
    unresolved_n_plus_ones = 5
    expect { epics.to_a }.not_to exceed_all_query_limit(control).with_threshold(unresolved_n_plus_ones)
    end
    end
    end
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment