lbry-sdk
lbry-sdk copied to clipboard
test_reorg: sometimes we enter the test with "self.ledger.headers.height" at 205 instead of expected 206
I think it's a problem with generate_and_wait() used during test setup. It waits on a TX, but not for the target height (206).
https://github.com/moodyjon/lbry-sdk/runs/8270128792?check_suite_focus=true
203
======================================================================
[204](https://github.com/moodyjon/lbry-sdk/runs/8270128792?check_suite_focus=true#step:11:205)
FAIL: test_reorg (integration.takeovers.test_resolve_command.ResolveAfterReorg)
[205](https://github.com/moodyjon/lbry-sdk/runs/8270128792?check_suite_focus=true#step:11:206)
----------------------------------------------------------------------
[206](https://github.com/moodyjon/lbry-sdk/runs/8270128792?check_suite_focus=true#step:11:207)
Traceback (most recent call last):
[207](https://github.com/moodyjon/lbry-sdk/runs/8270128792?check_suite_focus=true#step:11:208)
File "/home/runner/work/lbry-sdk/lbry-sdk/lbry/testcase.py", line 145, in run
[208](https://github.com/moodyjon/lbry-sdk/runs/8270128792?check_suite_focus=true#step:11:209)
self.loop.run_until_complete(maybe_coroutine)
[209](https://github.com/moodyjon/lbry-sdk/runs/8270128792?check_suite_focus=true#step:11:210)
File "/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
[210](https://github.com/moodyjon/lbry-sdk/runs/8270128792?check_suite_focus=true#step:11:211)
return future.result()
[211](https://github.com/moodyjon/lbry-sdk/runs/8270128792?check_suite_focus=true#step:11:212)
File "/home/runner/work/lbry-sdk/lbry-sdk/tests/integration/takeovers/test_resolve_command.py", line 1573, in test_reorg
[212](https://github.com/moodyjon/lbry-sdk/runs/8270128792?check_suite_focus=true#step:11:213)
self.assertEqual(self.ledger.headers.height, 206)
[213](https://github.com/moodyjon/lbry-sdk/runs/8270128792?check_suite_focus=true#step:11:214)
AssertionError: 205 != 206
[214](https://github.com/moodyjon/lbry-sdk/runs/8270128792?check_suite_focus=true#step:11:215)
[215](https://github.com/moodyjon/lbry-sdk/runs/8270128792?check_suite_focus=true#step:11:216)
----------------------------------------------------------------------