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

increase trials in "We are elected" test #3093

Merged
merged 1 commit into from
Oct 19, 2022
Merged

Conversation

JaredCorduan
Copy link
Contributor

The property test "We are elected as leader proportional to our stake" fails fairly infrequently, but often enough to be a annoying. I cannot find a problem with the test, I think that the variance with 500 trials is just too high. I've increased the number of trials to 2,000. It still runs quite fast (under a second).

Running in scenario: Development
Ledger with Delegation
  Unit Tests
    Test checkLeaderVal calculation
      We are elected as leader proportional to our stake: OK (0.72s)
        +++ OK, passed 100 tests.

I can get this test to fail consistently by setting withMaxSuccess to 500 when the number of trials is 500. With 2,000 trials, it succeeds often with withMaxSuccess set to 10,000.

If anyone else wants to check the math, that would be great too.

The property test "We are elected as leader proportional to our stake"
fails fairly infrequently, but often enough to be a disturbance. There
does not seem to be a problem with the test, just that the variance with
500 trials is too high. I've increased the number of trials to 2,000. It
still runs quite fast (under a second).
@JaredCorduan JaredCorduan merged commit 8e9b837 into master Oct 19, 2022
@iohk-bors iohk-bors bot deleted the jc/moar-trials branch October 19, 2022 17:18
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.

None yet

2 participants