Commit a3191e9a authored by Nikola Milojevic's avatar Nikola Milojevic

Merge branch 'rubocop-performance-openstruct-ci-reports-test-suite-comparer' into 'master'

Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/325744 [RUN ALL RSPEC]

See merge request gitlab-org/gitlab!60086
parents 407a946f e315d09e
......@@ -2681,7 +2681,6 @@ Performance/OpenStruct:
- 'ee/lib/gitlab/graphql/aggregations/epics/epic_node.rb'
- 'lib/api/wikis.rb'
- 'lib/gitlab/ci/ansi2html.rb'
- 'lib/gitlab/ci/reports/test_suite_comparer.rb'
- 'lib/gitlab/git/diff_collection.rb'
- 'lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb'
- 'lib/gitlab/testing/request_inspector_middleware.rb'
......
---
title: Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/325744
merge_request: 60086
author: Amit Patel @amit.savani
type: performance
......@@ -8,6 +8,7 @@ module Gitlab
DEFAULT_MAX_TESTS = 100
DEFAULT_MIN_TESTS = 10
TestSummary = Struct.new(:new_failures, :existing_failures, :resolved_failures, :new_errors, :existing_errors, :resolved_errors, keyword_init: true)
attr_reader :name, :base_suite, :head_suite
......@@ -90,7 +91,7 @@ module Gitlab
def limited_tests
strong_memoize(:limited_tests) do
# rubocop: disable CodeReuse/ActiveRecord
OpenStruct.new(
TestSummary.new(
new_failures: new_failures.take(max_tests),
existing_failures: existing_failures.take(max_tests(new_failures)),
resolved_failures: resolved_failures.take(max_tests(new_failures, existing_failures)),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment