Skip to content

Randomize specs#182

Merged
etagwerker merged 1 commit intomainfrom
randomize-tests
May 4, 2026
Merged

Randomize specs#182
etagwerker merged 1 commit intomainfrom
randomize-tests

Conversation

@arielj
Copy link
Copy Markdown

@arielj arielj commented May 4, 2026

Description

This PR enables a random order and fixes a test that was order-dependant.

Motivation and Context

While trying to debug the issue with the Ruby 2.3 tests sometimes failing, I noticed that we are not running tests with random order which is a common good practice to avoid order-dependent tests.

The updated test was sometimes failing because the NextRails class was memoizing the value and if the other tests ran before the first test, the memozied value was wrong. We have to reset the memoized value before every test to avoid issues.

How Has This Been Tested?

Running the tests locally many many times. Confirming with the output that the order is not static.

I will abide by the code of conduct

Copy link
Copy Markdown
Member

@etagwerker etagwerker left a comment

Choose a reason for hiding this comment

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

@arielj Looks good, thanks!

Copy link
Copy Markdown
Member

@etagwerker etagwerker left a comment

Choose a reason for hiding this comment

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

@arielj Looks good, thanks!

@etagwerker etagwerker merged commit d1d54af into main May 4, 2026
11 checks passed
@etagwerker etagwerker deleted the randomize-tests branch May 4, 2026 15:38
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.

2 participants