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

avoid using global LaunchParameters throughout the codebase #1563

Merged
merged 5 commits into from
Jan 13, 2022

Conversation

pragmaxim
Copy link
Collaborator

@pragmaxim pragmaxim commented Jan 8, 2022

There is a lot of Randomness in tests which causes non-deterministic failures, especially with generators that run a test many times. When we have complete control over parameters then we can change it or override it on a single place and troubleshoot all tests together, ie. avoid fixing one and breaking others.

With this change, parameters are propagated as an instance wherever it is needed, instead of just calling LaunchParameters global object from everywhere.

I tried to change the randomly generated numbers that are used to generate boxes, transactions and blocks, but after day of trying, not being able to make ALL test pass with it, I figured the only way is to increase some limits like maxBlockCost or minValuePerByte just on a two places.

@pragmaxim pragmaxim requested a review from kushti January 8, 2022 13:37
@pragmaxim pragmaxim changed the base branch from master to v4.0.21 January 8, 2022 13:38
@kushti kushti added this to the 4.0.21 milestone Jan 13, 2022
Copy link
Member

@kushti kushti left a comment

Choose a reason for hiding this comment

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

Please check ScalaDoc, fix arguments where not updated

@kushti kushti merged commit 7769ffd into v4.0.21 Jan 13, 2022
@kushti kushti deleted the 1558-non-deterministic-test-failure-fixes branch January 13, 2022 22:25
@kushti kushti mentioned this pull request Jan 13, 2022
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