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

Swap order of waitForProcess and hGetContents to avoid blocking on windows #2101

Merged
merged 1 commit into from
Sep 5, 2020

Conversation

Anviking
Copy link
Collaborator

@Anviking Anviking commented Sep 2, 2020

Issue Number

#2083

Overview

  • Swapping order of operations seems to fix problem that only arises on windows, and with tx >=5 outputs
  • Fixes WALLETS_UTXO_02

Comments

  • I am re-running all windows tests locally to be more sure

@Anviking Anviking self-assigned this Sep 2, 2020
@Anviking
Copy link
Collaborator Author

Anviking commented Sep 2, 2020

bors try

iohk-bors bot added a commit that referenced this pull request Sep 2, 2020
@Anviking Anviking requested review from KtorZ and rvl and removed request for rvl and KtorZ September 2, 2020 09:33
@Anviking Anviking marked this pull request as draft September 2, 2020 09:49
@Anviking
Copy link
Collaborator Author

Anviking commented Sep 2, 2020

Seeing some failing stake pool tests on windows, not sure if related or if they previously existed

Failures:

  src\Test\Integration\Scenario\API\Shelley\StakePools.hs:145:9: 
  1) API Specifications STAKE_POOLS_JOIN_01 - Cannot join existent stakepool with wrong password
       uncaught exception: IOException of type UserError
       user error (Pattern match failure in do expression at src\Test\Integration\Scenario\API\Shelley\StakePools.hs:145:9-14)

  To rerun use: --match "/API Specifications/STAKE_POOLS_JOIN_01 - Cannot join existent stakepool with wrong password/"

  src\Test\Integration\Scenario\API\Shelley\StakePools.hs:159:9: 
  2) API Specifications STAKE_POOLS_JOIN_01 - Can join a pool, earn rewards and collect them
       uncaught exception: IOException of type UserError
       user error (Pattern match failure in do expression at src\Test\Integration\Scenario\API\Shelley\StakePools.hs:159:9-14)

  To rerun use: --match "/API Specifications/STAKE_POOLS_JOIN_01 - Can join a pool, earn rewards and collect them/"

  src\Test\Integration\Scenario\API\Shelley\StakePools.hs:312:9: 
  3) API Specifications STAKE_POOLS_JOIN_02 - Cannot join already joined stake pool
       uncaught exception: IOException of type UserError
       user error (Pattern match failure in do expression at src\Test\Integration\Scenario\API\Shelley\StakePools.hs:312:9-14)

  To rerun use: --match "/API Specifications/STAKE_POOLS_JOIN_02 - Cannot join already joined stake pool/"

  src\Test\Integration\Scenario\API\Shelley\StakePools.hs:335:5: 
  4) API Specifications STAKE_POOLS_JOIN_03 - Cannot join a pool that has retired
       uncaught exception: IOException of type UserError
       user error (Waited longer than 2 minutes for an action to resolve. Action: "One of the pools should retire.". Error condition: Just (HUnitFailure (Just (SrcLoc {srcLocPackage = "cardano-wallet-core-integration-2020.8.3-3441GTY1NwEB2Cbl2fiLa1", srcLocModule = "Test.Integration.Scenario.API.Shelley.StakePools", srcLocFile = "src\\Test\\Integration\\Scenario\\API\\Shelley\\StakePools.hs", srcLocStartLine = 338, srcLocStartCol = 31, srcLocEndLine = 338, srcLocEndCol = 47})) (ExpectedButGot Nothing "3" "0")))

  To rerun use: --match "/API Specifications/STAKE_POOLS_JOIN_03 - Cannot join a pool that has retired/"

  src\Test\Integration\Scenario\API\Shelley\StakePools.hs:361:9: 
  5) API Specifications STAKE_POOLS_QUIT_02 - Passphrase must be correct to quit
       uncaught exception: IOException of type UserError
       user error (Pattern match failure in do expression at src\Test\Integration\Scenario\API\Shelley\StakePools.hs:361:9-14)

  To rerun use: --match "/API Specifications/STAKE_POOLS_QUIT_02 - Passphrase must be correct to quit/"

  src\Test\Integration\Scenario\API\Shelley\StakePools.hs:400:9: 
  6) API Specifications STAKE_POOLS_JOIN_01 - Can rejoin another stakepool
       uncaught exception: IOException of type UserError
       user error (Pattern match failure in do expression at src\Test\Integration\Scenario\API\Shelley\StakePools.hs:400:9-21)

  To rerun use: --match "/API Specifications/STAKE_POOLS_JOIN_01 - Can rejoin another stakepool/"

  src\Test\Integration\Scenario\API\Shelley\StakePools.hs:466:9: 
  7) API Specifications STAKE_POOLS_JOIN_04 - Rewards accumulate
       uncaught exception: IOException of type UserError
       user error (Pattern match failure in do expression at src\Test\Integration\Scenario\API\Shelley\StakePools.hs:466:9-14)

  To rerun use: --match "/API Specifications/STAKE_POOLS_JOIN_04 - Rewards accumulate/"

  src\Test\Integration\Scenario\API\Shelley\StakePools.hs:500:5: 
  8) API Specifications STAKE_POOLS_JOIN_05 - Can join when stake key already exists
       uncaught exception: RequestException
       DecodeFailure "Error in $: parsing Cardano.Wallet.Api.Types.ApiWallet(ApiWallet) failed, key \"id\" not found: Response {responseStatus = Status {statusCode = 409, statusMessage = \"Conflict\"}, responseVersion = HTTP/1.1, responseHeaders = [(\"Transfer-Encoding\",\"chunked\"),(\"Date\",\"Wed, 02 Sep 2020 10:54:50 GMT\"),(\"Server\",\"Warp/3.3.5\")], responseBody = \"{\\\"code\\\":\\\"wallet_already_exists\\\",\\\"message\\\":\\\"This operation would yield a wallet with the following id: 2a793eb367d44a42f658eb02d1004f50c14612fd However, I already know of a wallet with this id.\\\"}\", responseCookieJar = CJ {expose = []}, responseClose' = ResponseClose}"

  To rerun use: --match "/API Specifications/STAKE_POOLS_JOIN_05 - Can join when stake key already exists/"

  src\Test\Integration\Scenario\API\Shelley\StakePools.hs:529:13: 
  9) API Specifications, STAKE_POOLS_JOIN_01x - Fee boundary values, STAKE_POOLS_JOIN_01x - I can join if I have just the right amount
       uncaught exception: IOException of type UserError
       user error (Pattern match failure in do expression at src\Test\Integration\Scenario\API\Shelley\StakePools.hs:529:13-18)

  To rerun use: --match "/API Specifications/STAKE_POOLS_JOIN_01x - Fee boundary values/STAKE_POOLS_JOIN_01x - I can join if I have just the right amount/"

  src\Test\Integration\Scenario\API\Shelley\StakePools.hs:540:13: 
  10) API Specifications, STAKE_POOLS_JOIN_01x - Fee boundary values, STAKE_POOLS_JOIN_01x - I cannot join if I have not enough fee to cover
       uncaught exception: IOException of type UserError
       user error (Pattern match failure in do expression at src\Test\Integration\Scenario\API\Shelley\StakePools.hs:540:13-18)

  To rerun use: --match "/API Specifications/STAKE_POOLS_JOIN_01x - Fee boundary values/STAKE_POOLS_JOIN_01x - I cannot join if I have not enough fee to cover/"

  src\Test\Integration\Scenario\API\Shelley\StakePools.hs:559:13: 
  11) API Specifications, STAKE_POOLS_QUIT_01x - Fee boundary values, STAKE_POOLS_QUIT_01x - I can quit if I have enough to cover fee
       uncaught exception: IOException of type UserError
       user error (Pattern match failure in do expression at src\Test\Integration\Scenario\API\Shelley\StakePools.hs:559:13-18)

  To rerun use: --match "/API Specifications/STAKE_POOLS_QUIT_01x - Fee boundary values/STAKE_POOLS_QUIT_01x - I can quit if I have enough to cover fee/"

  src\Test\Integration\Scenario\API\Shelley\StakePools.hs:595:13: 
  12) API Specifications, STAKE_POOLS_QUIT_01x - Fee boundary values, STAKE_POOLS_QUIT_01x - I cannot quit if I have not enough to cover fees
       uncaught exception: IOException of type UserError
       user error (Pattern match failure in do expression at src\Test\Integration\Scenario\API\Shelley\StakePools.hs:595:13-18)

  To rerun use: --match "/API Specifications/STAKE_POOLS_QUIT_01x - Fee boundary values/STAKE_POOLS_QUIT_01x - I cannot quit if I have not enough to cover fees/"

  src\Test\Integration\Scenario\API\Shelley\StakePools.hs:626:9: 
  13) API Specifications, STAKE_POOLS_LIST_01 - List stake pools, has non-zero saturation & stake
       uncaught exception: IOException of type UserError
       user error (Waited longer than 2 minutes for an action to resolve. Action: "list pools returns non-empty list". Error condition: Just (HUnitFailure (Just (SrcLoc {srcLocPackage = "cardano-wallet-core-integration-2020.8.3-3441GTY1NwEB2Cbl2fiLa1", srcLocModule = "Test.Integration.Scenario.API.Shelley.StakePools", srcLocFile = "src\\Test\\Integration\\Scenario\\API\\Shelley\\StakePools.hs", srcLocStartLine = 631, srcLocStartCol = 23, srcLocEndLine = 631, srcLocEndCol = 39})) (ExpectedButGot Nothing "3" "0")))

  To rerun use: --match "/API Specifications/STAKE_POOLS_LIST_01 - List stake pools/has non-zero saturation & stake/"

  src\Test\Integration\Scenario\API\Shelley\StakePools.hs:646:9: 
  14) API Specifications, STAKE_POOLS_LIST_01 - List stake pools, pools have the correct retirement information
       uncaught exception: IOException of type UserError
       user error (Waited longer than 2 minutes for an action to resolve. Action: "pools have the correct retirement information". Error condition: Just (HUnitFailure (Just (SrcLoc {srcLocPackage = "cardano-wallet-core-integration-2020.8.3-3441GTY1NwEB2Cbl2fiLa1", srcLocModule = "Test.Integration.Scenario.API.Shelley.StakePools", srcLocFile = "src\\Test\\Integration\\Scenario\\API\\Shelley\\StakePools.hs", srcLocStartLine = 668, srcLocStartCol = 17, srcLocEndLine = 668, srcLocEndCol = 75})) (ExpectedButGot Nothing "fromList [Nothing,Just (EpochNo {unEpochNo = 100000}),Just (EpochNo {unEpochNo = 1000000})]" "fromList []")))

  To rerun use: --match "/API Specifications/STAKE_POOLS_LIST_01 - List stake pools/pools have the correct retirement information/"

  src\Test\Integration\Scenario\API\Shelley\StakePools.hs:670:9: 
  15) API Specifications, STAKE_POOLS_LIST_01 - List stake pools, eventually has correct margin, cost and pledge
       uncaught exception: IOException of type UserError
       user error (Waited longer than 2 minutes for an action to resolve. Action: "pool worker finds the certificate". Error condition: Just (HUnitFailure (Just (SrcLoc {srcLocPackage = "cardano-wallet-core-integration-2020.8.3-3441GTY1NwEB2Cbl2fiLa1", srcLocModule = "Test.Integration.Scenario.API.Shelley.StakePools", srcLocFile = "src\\Test\\Integration\\Scenario\\API\\Shelley\\StakePools.hs", srcLocStartLine = 678, srcLocStartCol = 17, srcLocEndLine = 679, srcLocEndCol = 58})) (ExpectedButGot Nothing "fromList [Quantity {getQuantity = 0}]" "fromList []")))

  To rerun use: --match "/API Specifications/STAKE_POOLS_LIST_01 - List stake pools/eventually has correct margin, cost and pledge/"

  src\Test\Integration\Scenario\API\Shelley\StakePools.hs:693:9: 
  16) API Specifications, STAKE_POOLS_LIST_01 - List stake pools, at least one pool eventually produces block
       uncaught exception: IOException of type UserError
       user error (Waited longer than 2 minutes for an action to resolve. Action: "eventually produces block". Error condition: Just (HUnitFailure (Just (SrcLoc {srcLocPackage = "cardano-wallet-core-integration-2020.8.3-3441GTY1NwEB2Cbl2fiLa1", srcLocModule = "Test.Integration.Scenario.API.Shelley.StakePools", srcLocFile = "src\\Test\\Integration\\Scenario\\API\\Shelley\\StakePools.hs", srcLocStartLine = 701, srcLocStartCol = 17, srcLocEndLine = 701, srcLocEndCol = 49})) (Reason "predicate failed on: 0")))

  To rerun use: --match "/API Specifications/STAKE_POOLS_LIST_01 - List stake pools/at least one pool eventually produces block/"

  src\Test\Integration\Scenario\API\Shelley\StakePools.hs:704:9: 
  17) API Specifications, STAKE_POOLS_LIST_01 - List stake pools, contains pool metadata
       uncaught exception: IOException of type UserError
       user error (Waited longer than 2 minutes for an action to resolve. Action: "metadata is fetched". Error condition: Just (HUnitFailure (Just (SrcLoc {srcLocPackage = "cardano-wallet-core-integration-2020.8.3-3441GTY1NwEB2Cbl2fiLa1", srcLocModule = "Test.Integration.Scenario.API.Shelley.StakePools", srcLocFile = "src\\Test\\Integration\\Scenario\\API\\Shelley\\StakePools.hs", srcLocStartLine = 735, srcLocStartCol = 23, srcLocEndLine = 735, srcLocEndCol = 39})) (ExpectedButGot Nothing "3" "0")))

  To rerun use: --match "/API Specifications/STAKE_POOLS_LIST_01 - List stake pools/contains pool metadata/"

  src\Test\Integration\Scenario\API\Shelley\StakePools.hs:743:9: 
  18) API Specifications, STAKE_POOLS_LIST_01 - List stake pools, contains and is sorted by non-myopic-rewards
       uncaught exception: IOException of type UserError
       user error (Waited longer than 2 minutes for an action to resolve. Action: "eventually shows non-zero rewards". Error condition: Just user error (Pattern match failure in do expression at src\Test\Integration\Scenario\API\Shelley\StakePools.hs:745:17-48))

  To rerun use: --match "/API Specifications/STAKE_POOLS_LIST_01 - List stake pools/contains and is sorted by non-myopic-rewards/"

  src\Test\Integration\Scenario\API\Shelley\StakePools.hs:754:9: 
  19) API Specifications, STAKE_POOLS_LIST_01 - List stake pools, non-myopic-rewards are based on stake
       uncaught exception: IOException of type UserError
       user error (Waited longer than 2 minutes for an action to resolve. Action: "rewards are smaller for smaller stakes". Error condition: Just user error (0 does not satisfy (> 0)))       

  To rerun use: --match "/API Specifications/STAKE_POOLS_LIST_01 - List stake pools/non-myopic-rewards are based on stake/"

Randomized with seed 798442428

Finished in 3469.1242 seconds
644 examples, 19 failures, 3 pending

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Sep 2, 2020

try

Build failed

    rollback
      Can rollback to any arbitrary known checkpoint
        +++ OK, passed 100 tests.
      Correctly re-construct tx history on rollbacks
        +++ OK, passed 400 tests:
        66.5% rolling back something

@Anviking
Copy link
Collaborator Author

Anviking commented Sep 2, 2020

bors try

iohk-bors bot added a commit that referenced this pull request Sep 2, 2020
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Sep 2, 2020

try

Build succeeded

Copy link
Member

@KtorZ KtorZ left a comment

Choose a reason for hiding this comment

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

The change looks good, let me know how the windows tests are reacting?

@Anviking
Copy link
Collaborator Author

Anviking commented Sep 2, 2020

  • Stake pool tests fail when running everything
  • Stake pool tests succeed in isolation 🙃

(WALLETS_UTXO_02 passes though, which was the goal of this PR)

Trying to avoid a 60 minute feedback loop, I'm thinking I should try to better understand the windows process logic in isolation with a property test (seems good to have even if this PR didn't cause the stake pool test failures)

@Anviking
Copy link
Collaborator Author

Anviking commented Sep 2, 2020

Didn't manage to reproduce anything interesting using a echoline.exe called with process, hPutStr and waitForProcess.

Cardano.CLI
  Interactive processes
    alphaNum chars rountrip FAILED [1]
    isAscii strings without newlines rountrip 
      +++ OK, passed 100 tests.
    aaaaa... rountrips
      +++ OK, passed 100 tests.

Failures:

  test/unit\Cardano\CLISpec.hs:673:9: 
  1) Cardano.CLI, Interactive processes, alphaNum chars rountrip
       uncaught exception: IOException of type InvalidArgument
       fd:3: commitBuffer: invalid argument (invalid character)
       (after 5 tests and 1 shrink)
         "\7919"

Using (actually, the above results are from another version, but approximately the same):

        let proc' cmd args = (proc cmd args)
                { std_in = CreatePipe, std_out = CreatePipe, std_err = CreatePipe }
        let process = proc' ($(getTestData) </> "echoline.exe") []
        let echoViaProcess x = withCreateProcess process $
                \(Just stdin) (Just stdout) (Just stderr) h -> do
                    hPutStr stdin (x ++ "\n")
                    hFlush stdin
                    hClose stdin
                    c <- waitForProcess h
                    out <- TIO.hGetContents stdout
                    err <- TIO.hGetContents stderr
                    return (c, T.unpack out, err)

        let assertEqual a b = do
                monitor $ counterexample $ show a ++ " /= " ++ show b
                assert $ a == b

        it "alphaNum chars rountrip"
            $ property
            $ \(str :: String) -> monadicIO $ do
                let a = filter isAlphaNum str
                (_, b, _) <- run $ echoViaProcess a
                let strip = T.unpack . T.strip . T.pack
                strip b `assertEqual` a

@Anviking Anviking marked this pull request as ready for review September 2, 2020 15:18
@Anviking
Copy link
Collaborator Author

Anviking commented Sep 2, 2020

I think merging and seeing what the windows CI says about this shouldn't hurt.
bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Sep 2, 2020

This PR was included in a batch with a merge conflict, it will be automatically retried

iohk-bors bot added a commit that referenced this pull request Sep 2, 2020
2101: Swap order of waitForProcess and hGetContents to avoid blocking on windows r=Anviking a=Anviking

# Issue Number

#2083 


# Overview

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

- [x] Swapping order of operations seems to fix problem that only arises on windows, and with tx >=5 outputs 
- [x] Fixes `WALLETS_UTXO_02`


# Comments

- [ ] I am re-running _all_ windows tests locally to be more sure

<!-- Additional comments or screenshots to attach if any -->

<!-- 
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)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Johannes Lund <anviking@me.com>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Sep 2, 2020

Build failed


  src/Test/Integration/Scenario/API/Byron/Addresses.hs:423:11:
  1) API Specifications, BYRON_ADDRESSES, ADDRESS_IMPORT_05 - I can import 15000 of addresses
       expected: 15000
        but got: 0

  To rerun use: --match "/API Specifications/BYRON_ADDRESSES/ADDRESS_IMPORT_05 - I can import 15000 of addresses/"

Randomized with seed 576138695

@Anviking
Copy link
Collaborator Author

Anviking commented Sep 2, 2020

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Sep 2, 2020

This PR was included in a batch with a merge conflict, it will be automatically retried

iohk-bors bot added a commit that referenced this pull request Sep 2, 2020
2101: Swap order of waitForProcess and hGetContents to avoid blocking on windows r=Anviking a=Anviking

# Issue Number

#2083 


# Overview

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

- [x] Swapping order of operations seems to fix problem that only arises on windows, and with tx >=5 outputs 
- [x] Fixes `WALLETS_UTXO_02`


# Comments

- [ ] I am re-running _all_ windows tests locally to be more sure

<!-- Additional comments or screenshots to attach if any -->

<!-- 
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)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


2105: Add test case for importing invalid addresses for Byron r=hasufell a=hasufell

#2011 

Co-authored-by: Johannes Lund <anviking@me.com>
Co-authored-by: Julian Ospald <julian.ospald@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Sep 2, 2020

This PR was included in a batch that was canceled, it will be automatically retried

iohk-bors bot added a commit that referenced this pull request Sep 2, 2020
2101: Swap order of waitForProcess and hGetContents to avoid blocking on windows r=Anviking a=Anviking

# Issue Number

#2083 


# Overview

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

- [x] Swapping order of operations seems to fix problem that only arises on windows, and with tx >=5 outputs 
- [x] Fixes `WALLETS_UTXO_02`


# Comments

- [ ] I am re-running _all_ windows tests locally to be more sure

<!-- Additional comments or screenshots to attach if any -->

<!-- 
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)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


2105: Add test case for importing invalid addresses for Byron r=hasufell a=hasufell

#2011 

Co-authored-by: Johannes Lund <anviking@me.com>
Co-authored-by: Julian Ospald <julian.ospald@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Sep 2, 2020

Build failed (retrying...)

cardano-wallet-core-2020.8.3: Test suite unit passed
--
  | Progress 5/6: cardano-wallet-2020.8.3
  | Timed out after 45 minutes.
  |  

iohk-bors bot added a commit that referenced this pull request Sep 2, 2020
2101: Swap order of waitForProcess and hGetContents to avoid blocking on windows r=Anviking a=Anviking

# Issue Number

#2083 


# Overview

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

- [x] Swapping order of operations seems to fix problem that only arises on windows, and with tx >=5 outputs 
- [x] Fixes `WALLETS_UTXO_02`


# Comments

- [ ] I am re-running _all_ windows tests locally to be more sure

<!-- Additional comments or screenshots to attach if any -->

<!-- 
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)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Johannes Lund <anviking@me.com>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Sep 2, 2020

Build failed

cardano-wallet-core-2020.8.3: Test suite unit passed
--
  | Progress 5/6: cardano-wallet-2020.8.3
  | Timed out after 45 minutes.

@Anviking
Copy link
Collaborator Author

Anviking commented Sep 2, 2020

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Sep 2, 2020

Build failed

@rvl
Copy link
Contributor

rvl commented Sep 2, 2020

P.S. You do not need to wait for the nightly build to check that it will work.
You can download the windows testing bundle from hydra cardano-wallet-pr-2101, unzip on your windows VM, then run integration.exe. You may want to run the test multiple times 😉.

@Anviking
Copy link
Collaborator Author

Anviking commented Sep 3, 2020

You do not need to wait for the nightly build to check that it will work.

That wasn't my problem. I was already running with stack test. I thought I might as well have another machine running and recording tests.

Thanks for the interruptibleWaitForProcess pointer + explanation.

Just swapping out the waitForProcess for that version doesn't seem to help however:

  • interruptableWaitForProcess in postTransactionViaCLI
    • Original order (First waitForProcess, then hGetContents)
      • Times out on WALLETS_UTXO_02
    • Swapped order (First hGetContents, then waitForProcess)
      • stack test cardano-wallet:integration --ta "--match WALLETS_UTXO_02" passes
      • stack test cardano-wallet:integration fails on stake pool tests
  • Normal waitForProcess in postTransactionViaCLI
    • Original order (waitForProcess, then hGetContents)
      • Times out on WALLETS_UTXO_02
    • Swapped order (hGetContents, then waitForProcess)
      • stack test cardano-wallet:integration --ta "--match WALLETS_UTXO_02" passes
      • stack test cardano-wallet:integration fails on stake pool tests
  • Removing one of the coins in the test setup
    - stack test cardano-wallet:integration --ta "--match WALLETS_UTXO_02" passes
    - stack test cardano-wallet:integration passes
    - Would be a "workaround", but an unsatisfying one

On stake pool test failures:

  • Failures indicate listing pools returns []
  • But we do see Fetched pool data from node tip using LSQ. Got 3 pools in the stake distribution, and 3 pools in the non-myopic member reward map.
  • Why is this correlated with the order of operations in a preceding postTransactionsViaCLI (it shouldn't even be preceding 🤔 )?
    • No, postTransactionsViaCLI shouldn't be called before the API Stake pool tests.

@Anviking
Copy link
Collaborator Author

Anviking commented Sep 3, 2020

bors r+

@Anviking
Copy link
Collaborator Author

Anviking commented Sep 3, 2020

I was suddenly unable to reproduce the failing stake pool tests on windows, so I'm keen to have CI be running this.

iohk-bors bot added a commit that referenced this pull request Sep 3, 2020
2101: Swap order of waitForProcess and hGetContents to avoid blocking on windows r=Anviking a=Anviking

# Issue Number

#2083 


# Overview

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

- [x] Swapping order of operations seems to fix problem that only arises on windows, and with tx >=5 outputs 
- [x] Fixes `WALLETS_UTXO_02`


# Comments

- [ ] I am re-running _all_ windows tests locally to be more sure

<!-- Additional comments or screenshots to attach if any -->

<!-- 
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)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Johannes Lund <anviking@me.com>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Sep 3, 2020

Build failed

@Anviking
Copy link
Collaborator Author

Anviking commented Sep 4, 2020

bors try

iohk-bors bot added a commit that referenced this pull request Sep 4, 2020
@Anviking
Copy link
Collaborator Author

Anviking commented Sep 4, 2020

Adding temporary code to run in bors try => Do not merge.

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Sep 4, 2020

try

Build failed

@Anviking
Copy link
Collaborator Author

Anviking commented Sep 4, 2020

bors try

iohk-bors bot added a commit that referenced this pull request Sep 4, 2020
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Sep 4, 2020

try

Build succeeded

@Anviking Anviking force-pushed the anviking/2083/fix branch 2 times, most recently from 17adb2a to bfeac1b Compare September 4, 2020 15:55
@Anviking
Copy link
Collaborator Author

Anviking commented Sep 4, 2020

bors r+

iohk-bors bot added a commit that referenced this pull request Sep 4, 2020
2101: Swap order of waitForProcess and hGetContents to avoid blocking on windows r=Anviking a=Anviking

# Issue Number

#2083 


# Overview

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

- [x] Swapping order of operations seems to fix problem that only arises on windows, and with tx >=5 outputs 
- [x] Fixes `WALLETS_UTXO_02`


# Comments

- [ ] I am re-running _all_ windows tests locally to be more sure

<!-- Additional comments or screenshots to attach if any -->

<!-- 
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)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Johannes Lund <anviking@me.com>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Sep 4, 2020

Build failed

#2114

@Anviking
Copy link
Collaborator Author

Anviking commented Sep 4, 2020

bors try

iohk-bors bot added a commit that referenced this pull request Sep 4, 2020
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Sep 4, 2020

try

Timed out

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

3 participants