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

[CIVIS-9349] assign the single running test suite for a test if none found by test suite name #139

Merged

Conversation

anmarchenko
Copy link
Member

What does this PR do?
Makes test suite assignment more robust by assigning the single runinng test suite to a test when no test suite found by name.

Motivation
There are cases where minitest test suite names fluctuate from test to test because of using external libraries like shoulda-context and/or activesupport concerns. While #134 fixed most of these cases there are still a very small chance of some test cases (inside anonymous classes?) that are skipped because of missing test suite id.

Thankfully, if minitest executes tests sequentially, there should be only one test suite running at a time: we can use it to assign "lost tests" to whichever test suite that is currently running.

How to test the change?
Unit tests are provided

@anmarchenko anmarchenko requested review from a team as code owners March 18, 2024 14:30
@anmarchenko anmarchenko requested a review from tonyredondo March 18, 2024 14:30
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 95.91837% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 99.06%. Comparing base (301b899) to head (0f74894).

Files Patch % Lines
lib/datadog/ci/test_visibility/recorder.rb 81.81% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #139      +/-   ##
==========================================
- Coverage   99.08%   99.06%   -0.03%     
==========================================
  Files         164      164              
  Lines        7239     7288      +49     
  Branches      304      308       +4     
==========================================
+ Hits         7173     7220      +47     
- Misses         66       68       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@anmarchenko anmarchenko merged commit 890de12 into main Mar 18, 2024
27 checks passed
@anmarchenko anmarchenko deleted the anmarchenko/always_connect_test_to_running_test_suite branch March 18, 2024 15:14
@github-actions github-actions bot added this to the 0.9.0 milestone Mar 18, 2024
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

Successfully merging this pull request may close these issues.

3 participants