Skip to content

Commit

Permalink
coin move flake: randomly fails on CI because there's 1 'penalty' event
Browse files Browse the repository at this point in the history
Flaky test happening because l1 doesn't have the second 'penalty' event
registered yet.

```
        # l1 loses all of their channel balance to the peer, as penalties
        expected_1 = {
            '0': [('wallet', ['deposit'], ['withdrawal'], 'A')],
            'A': [('wallet', ['deposit'], None, None), ('cid1', ['channel_open', 'opener'], ['channel_close'], 'B')],
            'B': [('external', ['penalty'], None, None), ('external', ['penalty'], None, None)],
        }

...
        # We use a subset of tags in expected_2 that are used in expected_1
>       tags = check_utxos_channel(l1, [channel_id], expected_1)

tests/test_closing.py:661:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/utils.py:321: in check_utxos_channel
    txid = matchup_events(u_set, evs, chans, tag_list)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

u_set = [[{'account_id': 'external', 'blockheight': 104, 'coin_type': 'bcrt', 'credit': '100000000msat', ...}, None]]
evs = [('external', ['penalty'], None, None), ('external', ['penalty'], None, None)]
chans = ['9e9e0784560f1a01000f27d8da1352e5d332823c441c2871cf5a9409e3989ff6']
tag_list = {'0': '2d8a44e1541d679c487116c6bbf115a1cf8a00f9292fc6567e579bb378488113', 'A': 'f79f98e309945acf71281c443c8232d3e55213dad8270f00011a0f5684079e9e', 'B': '2a2a72017c76ae503eac667c363c06480d2d966082af9912ee0997f9afc424e9'}

    def matchup_events(u_set, evs, chans, tag_list):
>       assert len(u_set) == len(evs) and len(u_set) > 0
E       AssertionError

tests/utils.py:237: AssertionError
```
  • Loading branch information
niftynei committed Feb 28, 2022
1 parent 9de4c5e commit ba1d9aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_closing.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ def test_penalty_inhtlc(node_factory, bitcoind, executor, chainparams):

bitcoind.generate_block(100)

sync_blockheight(bitcoind, [l2])
sync_blockheight(bitcoind, [l1, l2])
wait_for(lambda: len(l2.rpc.listpeers()['peers']) == 0)

# Do one last pass over the logs to extract the reactions l2 sent
Expand Down

0 comments on commit ba1d9aa

Please sign in to comment.