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

Removed call to tail, and the 'watchPulser' test #3912

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

TimSheard
Copy link
Contributor

The following test causes a failure on Master

TASTY_PATTERN='/Watch pulser on traces of length 120./' cabal test --test-options "--quickcheck-replay=433821"

to make a step test, where we test a property on every (state{n}, state{n+1}) pair in trace we used the following pattern
pairs = zip states (tail states)
But in very rare occasions, when the number of states is 0 or 1, tail raises the empty List error.
We can easily fix this by pattern matching, and return true when that is the case.

We also removed the '/Watch pulser on traces of length 120./' test, which uses trace and prints too much stuff.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages. New section is never added with the code changes. (See RELEASING.md)
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@TimSheard TimSheard requested a review from lehins December 5, 2023 16:46
Copy link
Contributor

@lehins lehins left a comment

Choose a reason for hiding this comment

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

Just a little linting. Otherwise its great.

@lehins lehins enabled auto-merge December 6, 2023 01:50
@lehins lehins disabled auto-merge December 6, 2023 01:50
@lehins lehins enabled auto-merge (squash) December 6, 2023 01:50
TimSheard and others added 2 commits December 6, 2023 17:28
Co-authored-by: Alexey Kuleshevich <alexey.kuleshevich@iohk.io>
@lehins lehins merged commit 5922372 into master Dec 6, 2023
11 of 29 checks passed
@iohk-bors iohk-bors bot deleted the ts-remove-call-to-tail branch December 6, 2023 16:47
@lehins lehins mentioned this pull request Dec 11, 2023
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