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

Improve test output #4575

Merged
merged 1 commit into from
Nov 1, 2022
Merged

Improve test output #4575

merged 1 commit into from
Nov 1, 2022

Conversation

newhoggy
Copy link
Contributor

@newhoggy newhoggy commented Oct 28, 2022

Exceptions in tests (for example from partial functions) cause failure without line number which makes the cause difficult to find. This PR switches to use functions that accurately convey location of failure in the test.

Use byDeadlineM instead of assertByDeadlineM, which allows specifying a period. This allows a longer poll time to be used so the test output isn't as spammy.

@newhoggy newhoggy force-pushed the newhoggy/less-flaky-tests-2 branch 5 times, most recently from fe66fc5 to 68cf8be Compare October 28, 2022 06:23
@newhoggy newhoggy marked this pull request as ready for review October 28, 2022 06:25
@newhoggy
Copy link
Contributor Author

Replaces #3596

@newhoggy newhoggy changed the title Reduce flakiness of tests: Improve test output Oct 28, 2022
Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

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

LGTM but there is an hlint error

import Data.Monoid (Last (..))
import Data.Set (Set)
import qualified Data.Set as Set
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@MarcFontaine MarcFontaine left a comment

Choose a reason for hiding this comment

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

LGTM

@newhoggy
Copy link
Contributor Author

bors r+

iohk-bors bot added a commit that referenced this pull request Oct 28, 2022
4575: Improve test output r=newhoggy a=newhoggy

Exceptions in tests (for example from partial functions) cause failure without line number which makes the cause difficult to find.  This PR switches to use functions that accurately convey location of failure in the test.

Use `byDeadlineM` instead of `assertByDeadlineM`, which allows specifying a period.  This allows a longer poll time to be used so the test output isn't as spammy.

Co-authored-by: John Ky <john.ky@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 28, 2022

This PR was included in a batch that successfully built, but then failed to merge into master. It will not be retried.

Additional information:

{"message":"Waiting on code owner review from CarlosLopezDeLara, JaredCorduan, Jimbo4350, LudvikGalois, dcoutts, erikd, and/or input-output-hk/devops.","documentation_url":"https://docs.github.com/articles/about-protected-branches"}

@Jimbo4350
Copy link
Contributor

bors r+

iohk-bors bot added a commit that referenced this pull request Oct 29, 2022
4575: Improve test output r=Jimbo4350 a=newhoggy

Exceptions in tests (for example from partial functions) cause failure without line number which makes the cause difficult to find.  This PR switches to use functions that accurately convey location of failure in the test.

Use `byDeadlineM` instead of `assertByDeadlineM`, which allows specifying a period.  This allows a longer poll time to be used so the test output isn't as spammy.

Co-authored-by: John Ky <john.ky@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 29, 2022

Build failed:

@newhoggy
Copy link
Contributor Author

bors r+

iohk-bors bot added a commit that referenced this pull request Oct 31, 2022
4575: Improve test output r=newhoggy a=newhoggy

Exceptions in tests (for example from partial functions) cause failure without line number which makes the cause difficult to find.  This PR switches to use functions that accurately convey location of failure in the test.

Use `byDeadlineM` instead of `assertByDeadlineM`, which allows specifying a period.  This allows a longer poll time to be used so the test output isn't as spammy.

Co-authored-by: John Ky <john.ky@iohk.io>
@newhoggy
Copy link
Contributor Author

newhoggy commented Nov 1, 2022

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Nov 1, 2022

Build succeeded:

@iohk-bors iohk-bors bot merged commit fe4b372 into master Nov 1, 2022
@iohk-bors iohk-bors bot deleted the newhoggy/less-flaky-tests-2 branch November 1, 2022 06:59
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.

3 participants