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

refactor: prettify chunk management test #7659

Merged
merged 1 commit into from
Sep 22, 2022

Conversation

matklad
Copy link
Contributor

@matklad matklad commented Sep 21, 2022

Adding an explicit "test fixture" struct makes call-sites more readable (named args!) and makes making further changes easier.

No particular grand plan here, just figured this small change to be a marginal improvement!

@matklad matklad requested a review from mzhangmzz September 21, 2022 14:26
@matklad matklad requested a review from a team as a code owner September 21, 2022 14:26
});
Test {
validator_groups: 4,
chunk_only_producers: true,
Copy link
Contributor Author

@matklad matklad Sep 21, 2022

Choose a reason for hiding this comment

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

Huh, this is an unintended bugfix I think, this would should be true

(which makes me more confident that we actually need this change :) )

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if chunk_only_producers would be true here. The naming for the rest of the tests seem to indicate that if chunk_only_producers is true, the name is the tests would end with _cop

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And this test does end with _cop

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ie, it was wrongly false before.

Copy link
Contributor

Choose a reason for hiding this comment

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

ah sorry I must have misread something

@robin-near
Copy link
Contributor

Ahh this is so much better. Thanks for the refactoring and fix!

Adding an explicit "test fixture" struct makes call-sites more readable
(named args!) and makes making further changes easier.
@near-bulldozer near-bulldozer bot merged commit cfe855c into near:master Sep 22, 2022
@matklad matklad deleted the m/beautest branch September 22, 2022 15:56
nikurt pushed a commit that referenced this pull request Sep 26, 2022
Adding an explicit "test fixture" struct makes call-sites more readable (named args!) and makes making further changes easier.

No particular grand plan here, just figured this small change to be a marginal improvement!
nikurt pushed a commit that referenced this pull request Nov 9, 2022
Adding an explicit "test fixture" struct makes call-sites more readable (named args!) and makes making further changes easier.

No particular grand plan here, just figured this small change to be a marginal improvement!
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