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

Further prevent flakiness of LoggingSpec properties #2580

Merged
merged 4 commits into from
Mar 28, 2021

Conversation

Anviking
Copy link
Collaborator

Issue Number

#2368

Overview

  • Use withMaxSuccess 1 to ensure each ctx is only used for one test.

Comments

We previously ensured each test had its own ctx to prevent interference.
But in these property tests it doesn't matter. Let's use withMaxSuccess
1 as a quick workaround - which should still be acceptable.
Copy link
Contributor

@rvl rvl left a comment

Choose a reason for hiding this comment

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

Instead of limiting the property to 1 example (fine, but not nice from a flakiness perspective), we could (a) remove the use of QuickCheck here (see reverted commit), or (b) run a new server for each property example (see latest commit).

@Anviking
Copy link
Collaborator Author

Anviking commented Mar 26, 2021

Fine, that works too 😸 — thanks
bors r+

iohk-bors bot added a commit that referenced this pull request Mar 26, 2021
2580: Use withMaxSuccess 1 in LoggingSpec properties r=Anviking a=Anviking

# Issue Number

#2368 


# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] Use `withMaxSuccess 1` to ensure each `ctx` is only used for one test.


# Comments

- Quick and I believe fine workaround for #2573 (review)

<!--
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
 ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages.
-->


Co-authored-by: Johannes Lund <johannes.lund@iohk.io>
Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
@Anviking Anviking changed the title Use withMaxSuccess 1 in LoggingSpec properties Further prevent flakiness of LoggingSpec properties Mar 26, 2021
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Mar 26, 2021

Build failed:

src/Test/Integration/Scenario/API/Byron/Wallets.hs:187:59:
--
  | cardano-wallet             >   1) API Specifications, BYRON_WALLETS, BYRON_RESTORE_01, GET_01, LIST_01 - Restore a wallet, icarus 18 words
  | cardano-wallet             >        While verifying (Status {statusCode = 200, statusMessage = "OK"},Right (ApiByronWallet {id = ApiT {getApiT = WalletId {getWalletId = 558c149bb91bd95cbd6b53a2359817698d8fcb69}}, balance = ApiByronWalletBalance {available = Quantity {getQuantity = 0}, total = Quantity {getQuantity = 0}}, assets = ApiWalletAssetsBalance {available = ApiT {getApiT = TokenMap (fromList [])}, total = ApiT {getApiT = TokenMap (fromList [])}}, discovery = DiscoverySequential, name = ApiT {getApiT = WalletName {getWalletName = "Empty Byron Wallet"}}, passphrase = Just (ApiWalletPassphraseInfo {lastUpdatedAt = 2021-03-26 09:42:04.068596646 UTC}), state = ApiT {getApiT = Syncing (Quantity {getQuantity = Percentage {getPercentage = 7453 % 10000}})}, tip = ApiBlockReference {absoluteSlotNumber = ApiT {getApiT = SlotNo 1998}, slotId = ApiSlotId {epochNumber = ApiT {getApiT = EpochNo {unEpochNo = 39}}, slotNumber = ApiT {getApiT = SlotInEpoch {unSlotInEpoch = 48}}}, time = 2021-03-26 09:39:48.6 UTC, block = ApiBlockInfo {height = Quantity {getQuantity = 1000}}}}))
  | cardano-wallet             >        Waited longer than 90s to resolve action: "wallet is available and ready".
  | cardano-wallet             > [cardano-wallet.network:Warning:1862] [2021-03-26 10:08:34.04 UTC] Connection lost with the node. writev: resource vanished (Broken pipe)
  | cardano-wallet             >        expected: Ready
  | cardano-wallet             >         but got: Syncing (Quantity {getQuantity = Percentage {getPercentage = 7453 % 10000}})
  | cardano-wallet             >
  | cardano-wallet             >   To rerun use: --match "/API Specifications/BYRON_WALLETS/BYRON_RESTORE_01, GET_01, LIST_01 - Restore a wallet/icarus 18 words/"
  | cardano-wallet             >
  | cardano-wallet             >   src/Test/Integration/Framework/DSL.hs:2017:7:
  | cardano-wallet             >   2) API Specifications, SHELLEY_STAKE_POOLS, STAKE_POOLS_JOIN_01rewards - Can join a pool, earn rewards and collect them
  | cardano-wallet             >        expected a successful response but got an error: DecodeFailure "{\"code\":\"created_invalid_transaction\",\"message\":\"That's embarrassing. It looks like I've created an invalid transaction that could not be parsed by the node. Here's an error message that may help with debugging: HardForkApplyTxErrFromEra S (S (S (Z (WrapApplyTxErr {unwrapApplyTxErr = ApplyTxError [LedgerFailure (DelegsFailure (WithdrawalsNotInRewardsDELEGS (fromList [(RewardAcnt {getRwdNetwork = Mainnet, getRwdCred = KeyHashObj (KeyHash \\\"8fb209fce870f9ffe39ebe853fc838f8e289ace1e7eaa230378827e6\\\")},Coin 804520)])))]}))))\"}"
  | cardano-wallet             >        While verifying (Status {statusCode = 500, statusMessage = "Internal Server Error"},Left (DecodeFailure "{\"code\":\"created_invalid_transaction\",\"message\":\"That's embarrassing. It looks like I've created an invalid transaction that could not be parsed by the node. Here's an error message that may help with debugging: HardForkApplyTxErrFromEra S (S (S (Z (WrapApplyTxErr {unwrapApplyTxErr = ApplyTxError [LedgerFailure (DelegsFailure (WithdrawalsNotInRewardsDELEGS (fromList [(RewardAcnt {getRwdNetwork = Mainnet, getRwdCred = KeyHashObj (KeyHash \\\"8fb209fce870f9ffe39ebe853fc838f8e289ace1e7eaa230378827e6\\\")},Coin 804520)])))]}))))\"}"))
  | cardano-wallet             >
  | cardano-wallet             >   To rerun use: --match "/API Specifications/SHELLEY_STAKE_POOLS/STAKE_POOLS_JOIN_01rewards - Can join a pool, earn rewards and collect them/"
  | cardano-wallet             >
  | cardano-wallet             >   src/Test/Integration/Scenario/CLI/Shelley/HWWallets.hs:152:26:
  | cardano-wallet             >   3) CLI Specifications, SHELLEY_CLI_HW_WALLETS, HW_WALLETS_01x - Restoration from account public key preserves funds
  | cardano-wallet             >        While verifying ApiWallet {id = ApiT {getApiT = WalletId {getWalletId = 654ef7afd3b6c1cffa736ba7884351668ceff7a0}}, addressPoolGap = ApiT {getApiT = AddressPoolGap {getAddressPoolGap = 20}}, balance = ApiWalletBalance {available = Quantity {getQuantity = 0}, total = Quantity {getQuantity = 0}, reward = Quantity {getQuantity = 0}}, assets = ApiWalletAssetsBalance {available = ApiT {getApiT = TokenMap (fromList [])}, total = ApiT {getApiT = TokenMap (fromList [])}}, delegation = ApiWalletDelegation {active = ApiWalletDelegationNext {status = NotDelegating, target = Nothing, changesAt = Nothing}, next = []}, name = ApiT {getApiT = WalletName {getWalletName = "Wallet from pub key"}}, passphrase = Nothing, state = ApiT {getApiT = Syncing (Quantity {getQuantity = Percentage {getPercentage = 4021 % 10000}})}, tip = ApiBlockReference {absoluteSlotNumber = ApiT {getApiT = SlotNo 4000}, slotId = ApiSlotId {epochNumber = ApiT {getApiT = EpochNo {unEpochNo = 80}}, slotNumber = ApiT {getApiT = SlotInEpoch {unSlotInEpoch = 0}}}, time = 2021-03-26 09:46:29 UTC, block = ApiBlockInfo {height = Quantity {getQuantity = 2000}}}}
  | cardano-wallet             >        Waited longer than 90s to resolve action: "Wallet balance is as expected on wallet from pubKey".
  | cardano-wallet             >        expected: Quantity {getQuantity = 1000000}
  | cardano-wallet             >         but got: Quantity {getQuantity = 0}
  | cardano-wallet             >


#2565
#2428
#2467

@Anviking
Copy link
Collaborator Author

bors r+

iohk-bors bot added a commit that referenced this pull request Mar 26, 2021
2580: Further prevent flakiness of LoggingSpec properties r=Anviking a=Anviking

# Issue Number

#2368 


# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] Use `withMaxSuccess 1` to ensure each `ctx` is only used for one test.


# Comments

- Quick and I believe fine workaround for #2573 (review)

<!--
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
 ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages.
-->


Co-authored-by: Johannes Lund <johannes.lund@iohk.io>
Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Mar 26, 2021

Build failed:

  src/Test/Integration/Scenario/CLI/Shelley/Wallets.hs:416:50:
  1) CLI Specifications, SHELLEY_CLI_WALLETS, WALLETS_CREATE_08 - --address-pool-gap values, -1000 -> fail
       uncaught exception: IOException of type ResourceVanished
       fd:209: hFlush: resource vanished (Broken pipe)

  To rerun use: --match "/CLI Specifications/SHELLEY_CLI_WALLETS/WALLETS_CREATE_08 - --address-pool-gap values/-1000 -> fail/"

@Anviking
Copy link
Collaborator Author

bors r+

iohk-bors bot added a commit that referenced this pull request Mar 26, 2021
2580: Further prevent flakiness of LoggingSpec properties r=Anviking a=Anviking

# Issue Number

#2368 


# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] Use `withMaxSuccess 1` to ensure each `ctx` is only used for one test.


# Comments

- Quick and I believe fine workaround for #2573 (review)

<!--
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
 ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages.
-->


Co-authored-by: Johannes Lund <johannes.lund@iohk.io>
Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Mar 26, 2021

Build failed:


/tmp/stack-4b9f43a24bed67cc/test-ghc-env: openBinaryFile: resource busy (file is locked)
--
  |  
  | /tmp/stack-4b9f43a24bed67cc/test-ghc-env: openBinaryFile: resource busy (file is locked)
  |  
  | /tmp/stack-4b9f43a24bed67cc/test-ghc-env: openBinaryFile: resource busy (file is locked)


@Anviking
Copy link
Collaborator Author

bors r+

iohk-bors bot added a commit that referenced this pull request Mar 26, 2021
2580: Further prevent flakiness of LoggingSpec properties r=Anviking a=Anviking

# Issue Number

#2368 


# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] Use `withMaxSuccess 1` to ensure each `ctx` is only used for one test.


# Comments

- Quick and I believe fine workaround for #2573 (review)

<!--
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
 ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages.
-->


Co-authored-by: Johannes Lund <johannes.lund@iohk.io>
Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Mar 26, 2021

Build failed:

cardano-wallet             > Failures:
--
  | cardano-wallet             >
  | cardano-wallet             >   src/Test/Integration/Scenario/CLI/Shelley/HWWallets.hs:152:26:
  | cardano-wallet             >   1) CLI Specifications, SHELLEY_CLI_HW_WALLETS, HW_WALLETS_01x - Restoration from account public key preserves funds
  | cardano-wallet             >        While verifying ApiWallet {id = ApiT {getApiT = WalletId {getWalletId = 858ba5482bcb7abad14db29bcdb057c27995dd30}}, addressPoolGap = ApiT {getApiT = AddressPoolGap {getAddressPoolGap = 20}}, balance = ApiWalletBalance {available = Quantity {getQuantity = 0}, total = Quantity {getQuantity = 0}, reward = Quantity {getQuantity = 0}}, assets = ApiWalletAssetsBalance {available = ApiT {getApiT = TokenMap (fromList [])}, total = ApiT {getApiT = TokenMap (fromList [])}}, delegation = ApiWalletDelegation {active = ApiWalletDelegationNext {status = NotDelegating, target = Nothing, changesAt = Nothing}, next = []}, name = ApiT {getApiT = WalletName {getWalletName = "Wallet from pub key"}}, passphrase = Nothing, state = ApiT {getApiT = Syncing (Quantity {getQuantity = Percentage {getPercentage = 441 % 1000}})}, tip = ApiBlockReference {absoluteSlotNumber = ApiT {getApiT = SlotNo 4055}, slotId = ApiSlotId {epochNumber = ApiT {getApiT = EpochNo {unEpochNo = 81}}, slotNumber = ApiT {getApiT = SlotInEpoch {unSlotInEpoch = 5}}}, time = 2021-03-26 17:30:02 UTC, block = ApiBlockInfo {height = Quantity {getQuantity = 2000}}}}
  | cardano-wallet             >        Waited longer than 90s to resolve action: "Wallet balance is as expected on wallet from pubKey".
  | cardano-wallet             >        expected: Quantity {getQuantity = 1000000}
  | cardano-wallet             >         but got: Quantity {getQuantity = 0}
  | cardano-wallet             >
  | cardano-wallet             >   To rerun use: --match "/CLI Specifications/SHELLEY_CLI_HW_WALLETS/HW_WALLETS_01x - Restoration from account public key preserves funds/"
  | cardano-wallet             >
  | cardano-wallet             > Randomized with seed 410200852


@Anviking
Copy link
Collaborator Author

bors r+

iohk-bors bot added a commit that referenced this pull request Mar 27, 2021
2580: Further prevent flakiness of LoggingSpec properties r=Anviking a=Anviking

# Issue Number

#2368 


# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] Use `withMaxSuccess 1` to ensure each `ctx` is only used for one test.


# Comments

- Quick and I believe fine workaround for #2573 (review)

<!--
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
 ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages.
-->


Co-authored-by: Johannes Lund <johannes.lund@iohk.io>
Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Mar 27, 2021

Build failed:

@Anviking
Copy link
Collaborator Author

bors r+

iohk-bors bot added a commit that referenced this pull request Mar 27, 2021
2580: Further prevent flakiness of LoggingSpec properties r=Anviking a=Anviking

# Issue Number

#2368 


# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] Use `withMaxSuccess 1` to ensure each `ctx` is only used for one test.


# Comments

- Quick and I believe fine workaround for #2573 (review)

<!--
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
 ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages.
-->


Co-authored-by: Johannes Lund <johannes.lund@iohk.io>
Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Mar 27, 2021

Build failed:

@Anviking
Copy link
Collaborator Author

bors r+

iohk-bors bot added a commit that referenced this pull request Mar 28, 2021
2580: Further prevent flakiness of LoggingSpec properties r=Anviking a=Anviking

# Issue Number

#2368 


# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] Use `withMaxSuccess 1` to ensure each `ctx` is only used for one test.


# Comments

- Quick and I believe fine workaround for #2573 (review)

<!--
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
 ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages.
-->


Co-authored-by: Johannes Lund <johannes.lund@iohk.io>
Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Mar 28, 2021

Build failed:

@Anviking
Copy link
Collaborator Author

bors r+

Pls

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Mar 28, 2021

Build succeeded:

@iohk-bors iohk-bors bot merged commit 933139c into master Mar 28, 2021
@iohk-bors iohk-bors bot deleted the anviking/2368/maxSuccess branch March 28, 2021 13:04
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