Skip to content

Consistent Custom Channel itest Flakes #1095

Open
@linden

Description

@linden

when running make itest I'm seeing consistent flakes (roughly 9 out of 10 runs flake) on the custom_channels* tests. I've tried on both master and the v0.15.0-alpha release, on my machine and in a docker container. I'm on a fairly fast machine (2023 MacBook Pro M3 Max/128gb ram), so this is could be a race condition that the slower github actions machine isn't running into. as noted by #991, time.Sleep is used in quite a few places.

I've worked around these issues by adding retries to the AssetBalance checks and reverting this commit (on my fork), which passes consistently.

here's an example flake before my change to AssetBalance.

                Error Trace:    /Users/linden/go/pkg/mod/github.com/lightninglabs/[email protected]/itest/assertions.go:2323
                                                        /Users/linden/Documents/apps/linden/lightning-terminal/itest/assets_test.go:793
                                                        /Users/linden/Documents/apps/linden/lightning-terminal/itest/assets_test.go:465
                                                        /Users/linden/Documents/apps/linden/lightning-terminal/itest/litd_custom_channels_test.go:387
                                                        /Users/linden/Documents/apps/linden/lightning-terminal/itest/test_harness.go:103
                                                        /Users/linden/Documents/apps/linden/lightning-terminal/itest/litd_test.go:88
                Error:          Not equal: 
                                expected: 0xc3500
                                actual  : 0x0
                Test:           TestLightningTerminal/custom_channels
                Messages:       ListAssets balance, wanted 800000, got: {
                                    "assets": [],
                                    "unconfirmed_transfers": "1",
                                    "unconfirmed_mints": "0"
                                }

and after my change to AssetBalance but before reverting the commit:

    assets_test.go:1759: 
                Error Trace:    /Users/linden/Documents/apps/linden/lightning-terminal/itest/assets_test.go:1759
                                                        /Users/linden/Documents/apps/linden/lightning-terminal/itest/litd_custom_channels_test.go:2899
                                                        /Users/linden/Documents/apps/linden/lightning-terminal/itest/litd_custom_channels_test.go:2961
                                                        /Users/linden/Documents/apps/linden/lightning-terminal/itest/test_harness.go:103
                                                        /Users/linden/Documents/apps/linden/lightning-terminal/itest/litd_test.go:88
                Error:          Received unexpected error:
                                rpc error: code = DeadlineExceeded desc = context deadline exceeded
                Test:           TestLightningTerminal/custom_channels_liquidity

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions