Skip to content

fix(RSpec split by examples): Properly determine slow test files when test example execution times and full test file execution time are both known#281

Merged
ArturT merged 4 commits intomasterfrom
fix-split-by-examples
Oct 30, 2024
Merged

fix(RSpec split by examples): Properly determine slow test files when test example execution times and full test file execution time are both known#281
ArturT merged 4 commits intomasterfrom
fix-split-by-examples

Conversation

@ArturT
Copy link
Copy Markdown
Member

@ArturT ArturT commented Oct 30, 2024

Story

TODO: link to the internal story

Related

Description

About the problem:

We add up a spec file execution time and all test example execution times to determine the time of a test file, which doubles the execution time of a spec in the worst-case scenario. This leads to some tests not being split by test examples and unbalanced builds.

Changes

Use whichever execution time is larger:

  • The execution time of the entire test file
  • The sum of execution times of the test file examples

Checklist reminder

  • You added the changes to the UNRELEASED section of the CHANGELOG.md, including the needed bump (ie, patch, minor, major)
  • You follow the architecture outlined below for RSpec in Queue Mode, which is a work in progress (feel free to propose changes):
    • Pure: lib/knapsack_pro/pure/queue/rspec_pure.rb contains pure functions that are unit tested.
    • Extension: lib/knapsack_pro/extensions/rspec_extension.rb encapsulates calls to RSpec internals and is integration and e2e tested.
    • Runner: lib/knapsack_pro/runners/queue/rspec_runner.rb invokes the pure code and the extension to produce side effects, which are integration and e2e tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant