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

tests - make some tests faster by smaller unit sizes #151606

Merged
merged 1 commit into from
Jun 9, 2022
Merged

Conversation

bpasero
Copy link
Member

@bpasero bpasero commented Jun 9, 2022

This PR fixes #

@bpasero bpasero enabled auto-merge (squash) June 9, 2022 12:08
@VSCodeTriageBot VSCodeTriageBot added this to the June 2022 milestone Jun 9, 2022
Copy link
Member

@joaomoreno joaomoreno left a comment

Choose a reason for hiding this comment

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

Wait, won't this just increase both code size as well as overall test runtime? 😕

@bpasero
Copy link
Member Author

bpasero commented Jun 9, 2022

See #149712 (comment) for motivation and reasons.

I still think that a unit test doing as little as possible is easier to maintain vs a test that tests more assertions at once.

If there was an argument for many tests slowing things down, then shouldn't a suite just be a single test?

@bpasero bpasero requested a review from joaomoreno June 9, 2022 12:55
@joaomoreno
Copy link
Member

I still think that a unit test doing as little as possible is easier to maintain vs a test that tests more assertions at once.

Agree. But breaking tests apart just for the sake of having the average runtime of tests be lower doesn't make sense.

If there was an argument for many tests slowing things down, then shouldn't a suite just be a single test?

No, the argument is against creating arbitrary boundaries for the sake of lowering the average test runtime. Especially because the tests are now called Test X (1), Test X (2), Test X (3)... If they actually tested different things, that would make much more sense, ie Test X, Test Y, Test Z.

@bpasero bpasero merged commit d27edcc into main Jun 9, 2022
@bpasero bpasero deleted the ben/statutory-stoat branch June 9, 2022 13:35
@github-actions github-actions bot locked and limited conversation to collaborators Jul 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants