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 singleton random generators #312

Merged
merged 2 commits into from
May 9, 2019
Merged

Avoid singleton random generators #312

merged 2 commits into from
May 9, 2019

Conversation

tovbinm
Copy link
Collaborator

@tovbinm tovbinm commented May 9, 2019

Related issues
Random generators contain probabilityOfEmpty as their internal start. And since some of them were singletons, once probabilityOfEmpty was modified this would affect the values generated in other tests.

Describe the proposed solution
Avoid singleton generators instead always create a new random generator instance.

Describe alternatives you've considered
NA

@tovbinm tovbinm requested a review from Jauntbox May 9, 2019 22:38
@tovbinm tovbinm requested a review from leahmcguire as a code owner May 9, 2019 22:38
@codecov
Copy link

codecov bot commented May 9, 2019

Codecov Report

Merging #312 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master     #312    +/-   ##
========================================
  Coverage   86.48%   86.48%            
========================================
  Files         322      322            
  Lines       10579    10579            
  Branches      343      564   +221     
========================================
  Hits         9149     9149            
  Misses       1430     1430
Impacted Files Coverage Δ
...com/salesforce/op/testkit/ProbabilityOfEmpty.scala 100% <ø> (ø) ⬆️
...n/scala/com/salesforce/op/testkit/RandomText.scala 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2081d5e...f156dc9. Read the comment docs.

@tovbinm tovbinm requested a review from wsuchy May 9, 2019 23:18
Copy link
Contributor

@wsuchy wsuchy left a comment

Choose a reason for hiding this comment

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

OK

@tovbinm tovbinm merged commit 976cd25 into master May 9, 2019
@tovbinm tovbinm deleted the mt/fix-generators branch May 9, 2019 23:22
This was referenced Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants