Skip to content

Conversation

@sej3506
Copy link
Contributor

@sej3506 sej3506 commented Jul 9, 2025

Throughout the examples were stubs for class attributes that were bleeding between different examples and causing flakiness.

I added a before each block in spec_helper.rb that will reset the different things that caused this flakiness including:

  • Terrapin::CommandLine.path
  • Terrapin::CommandLine.runner

Moved the before and after blocks from runners_spec into the only example they apply to, since there could be conflicts between the befores.

I tested this locally with Ruby 3.4.4, 3.3.7, 3.2.7, 3.1.7, and 2.7.8

There were a number of stubs for class attributes that were bleeding
between different examples and causing flakiness.

I added a before each blog in spec_helper.rb that will reset all the
different things that caused this flakiness including:
- Terrapin::CommandLine.path
- Terrapin::CommandLine.runner
@sej3506 sej3506 requested a review from cpytel as a code owner July 9, 2025 18:26
after do
FileUtils.rm_f("#{Terrapin::CommandLine.path}/ls")
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heck yea 🥳

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for moving the setup stuff within the specific test that needs it!

@sej3506 sej3506 merged commit 094b575 into main Jul 9, 2025
8 checks passed
@sej3506 sej3506 deleted the fix_flaky_specs branch July 9, 2025 19:28
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