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

integration tests: all Electrum components inside an interpreter #7577

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bitromortac
Copy link
Contributor

@bitromortac bitromortac commented Nov 25, 2021

Currently, the tests have the same prerequisites as the regtest tests and can only be executed in isolation (one test at a time per pytest/unittest call). These tests are intended as an a supplement for the regtests. Depends on #7509.

Advantages:

  • launches several Electrum components to interact on a regtest network in a single interpreter
  • eases development, as one can debug into all clients within the same IDE (helped me a lot)
  • makes tests more flexible as one can inspect/patch methods and attributes while testing

Downsides:

  • tests do not reproduce fully realistic scenarios, where each component is an executable (to an extent this is also true for the regtest tests where only a single bitcoind is used)
  • it is not clear whether all side effects (state in imported modules) are reset (the order of resetting matters also)
  • LN transports are not closed properly -> use a new port (~hacky)
  • continue other tests after failed test
  • reset side effects in imported modules (need to do more probably)
  • synchronization of tests

helpmelorda

This comment was marked as spam.

@bitromortac bitromortac marked this pull request as draft December 9, 2021 10:52
* launches several Electrum components to interact on a regtest network
* reloads modules to remove side effects

synchronization of code is still TBD, get rid of asyncio.sleeps
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

2 participants