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

Flaky test - Cardano.Wallet.Shelley.Transaction estimateMaxNumberOfInputs timeout - macOS #2152

Closed
rvl opened this issue Sep 18, 2020 · 4 comments
Labels
Test failure A flaky test or nightly CI failure

Comments

@rvl
Copy link
Contributor

rvl commented Sep 18, 2020

Context

A unit test is sometimes failing on macOS due to a timeout.

Test Case

  • Package: cardano-wallet
  • Module: Cardano.Wallet.Shelley.TransactionSpec
  • Spec: estimateMaxNumberOfInputs for ByronKey on Mainnet
  • Platform: macOS
  • CI: Hydra

Failure / Counter-example

https://hydra.iohk.io/build/4162295

Failures:

  test/unit/Cardano/Wallet/Shelley/TransactionSpec.hs:222:9:
  1) Cardano.Wallet.Shelley.Transaction, estimateMaxNumberOfInputs for ByronKey on Mainnet, less outputs ==> more inputs
       Timeout (after 340 tests):
         Quantity {getQuantity = 1888}
         205

  To rerun use: --match "/Cardano.Wallet.Shelley.Transaction/estimateMaxNumberOfInputs for ByronKey on Mainnet/less outputs ==> more inputs/"


Resolution


QA

@rvl rvl added the Bug label Sep 18, 2020
@KtorZ
Copy link
Member

KtorZ commented Sep 18, 2020

That test as a timeout on the execution time, which is maybe a bit too tight for the mac mini running this in CI. Since it passes most of the time, we're probably not that far (although I am afraid that we'll hit the same issue with Windows).

We could increase the timeout and still make sure that the function executes within a reasonable time.

@rvl
Copy link
Contributor Author

rvl commented Sep 20, 2020

Is the timeout to ensure that excessively slow shrinkers or generators can be stopped? How long is it?

For this failure, is the timeout too short or is the test case too slow?

@KtorZ
Copy link
Member

KtorZ commented Sep 21, 2020

The timeout is to ensure that the function being testing executes within an acceptable time. That was part of the debugging / slowness analysis of large wallets. That function was on the critical path. Now, the acceptable time was previously set to 100ms yet, it's taking longer in CI for some generated values.

For this failure, is the timeout too short or is the test case too slow?

The tests (there are 3 using a timeout) are very short actually, some assertion on the result of estimateMaxNumberOfInputs with different parameters, so the test themselves are calling this function twice and checking that it doesn't take too long. Even one second would be fine here. But 20 or 30 wouldn't.

@Anviking Anviking added the Test failure A flaky test or nightly CI failure label Oct 1, 2020
@Anviking Anviking removed the Bug label Nov 19, 2020
@KtorZ KtorZ closed this as completed Dec 31, 2020
@Anviking Anviking reopened this Jan 25, 2021
@Anviking
Copy link
Member

Haven't seen again since 22 Jan. Think we can close.

@Anviking Anviking changed the title Flaky test - Cardano.Wallet.Shelley.Transaction estimateMaxNumberOfInputs - macOS Flaky test - Cardano.Wallet.Shelley.Transaction estimateMaxNumberOfInputs timeout - macOS Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Test failure A flaky test or nightly CI failure
Projects
None yet
Development

No branches or pull requests

3 participants