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

Relax coverage check for prop_rollbackRetirement. #1957

Merged
merged 1 commit into from
Jul 27, 2020

Conversation

jonathanknowles
Copy link
Contributor

Issue Number

None.

Summary

This PR relaxes the coverage check for the prop_rollbackRetirement property.

Before applying this change, QuickCheck would typically need to test this property many thousands of times in order to satisfy the coverage check.

Here's a particularly bad example (taking 36 seconds to complete on my system):

      rollback of PoolRetirement
        +++ OK, passed 12800 tests:
        95.000% length expectedPublications > 0
        67.633% 0 < length expectedPublications < length allPublications
        59.617% rollbackPoint = slotMinBound
        40.383% rollbackPoint > slotMinBound
         5.000% length expectedPublications = 0

After this change, QuickCheck is able to satisfy the coverage check after only a few hundred tests:

      rollback of PoolRetirement
        +++ OK, passed 400 tests:
        94.0% length expectedPublications > 0
        71.0% 0 < length expectedPublications < length allPublications
        60.8% rollbackPoint = slotMinBound
        39.2% rollbackPoint > slotMinBound
         6.0% length expectedPublications = 0

Before this change, QuickCheck would typically need to test this property
many thousands of times in order to satisfy the coverage check. Here's a
particularly bad example (taking 36 seconds to complete on my system):

      rollback of PoolRetirement
        +++ OK, passed 12800 tests:
        95.000% length expectedPublications > 0
        67.633% 0 < length expectedPublications < length allPublications
        59.617% rollbackPoint = slotMinBound
        40.383% rollbackPoint > slotMinBound
         5.000% length expectedPublications = 0

After this change, QuickCheck is able to satisfy the coverage check
after only a few hundred tests:

      rollback of PoolRetirement
        +++ OK, passed 400 tests:
        94.0% length expectedPublications > 0
        71.0% 0 < length expectedPublications < length allPublications
        60.8% rollbackPoint = slotMinBound
        39.2% rollbackPoint > slotMinBound
         6.0% length expectedPublications = 0
@jonathanknowles jonathanknowles self-assigned this Jul 27, 2020
Copy link
Contributor

@erikd erikd left a comment

Choose a reason for hiding this comment

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

How can that even be wrong?

@jonathanknowles
Copy link
Contributor Author

bors r+

iohk-bors bot added a commit that referenced this pull request Jul 27, 2020
1957: Relax coverage check for `prop_rollbackRetirement`. r=jonathanknowles a=jonathanknowles

# Issue Number

None.

# Summary

This PR relaxes the coverage check for the `prop_rollbackRetirement` property.

Before applying this change, QuickCheck would typically need to test this property _many thousands of times_ in order to satisfy the coverage check.

Here's a particularly bad example (taking 36 seconds to complete on my system):

```hs
      rollback of PoolRetirement
        +++ OK, passed 12800 tests:
        95.000% length expectedPublications > 0
        67.633% 0 < length expectedPublications < length allPublications
        59.617% rollbackPoint = slotMinBound
        40.383% rollbackPoint > slotMinBound
         5.000% length expectedPublications = 0
```

After this change, QuickCheck is able to satisfy the coverage check after only a few hundred tests:

```hs
      rollback of PoolRetirement
        +++ OK, passed 400 tests:
        94.0% length expectedPublications > 0
        71.0% 0 < length expectedPublications < length allPublications
        60.8% rollbackPoint = slotMinBound
        39.2% rollbackPoint > slotMinBound
         6.0% length expectedPublications = 0
```

Co-authored-by: Jonathan Knowles <[email protected]>
@iohk-bors

This comment has been minimized.

@jonathanknowles

This comment has been minimized.

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 27, 2020

Build succeeded

@iohk-bors iohk-bors bot merged commit 93c177b into master Jul 27, 2020
@iohk-bors iohk-bors bot deleted the jonathanknowles/relax-property-coverage-check branch July 27, 2020 06:20
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