bitcoinops / taproot-workshop

Taproot & Schnorr Python Library & Documentation.
MIT License
375 stars 112 forks source link

Check that no bitcoind processes are running before starting test #18

Closed jnewbery closed 4 years ago

jnewbery commented 5 years ago

~This builds on #17. Review that first.~

This PR adds a check to TestWrapper.setup() that checks whether there are any bitcoind processes running, and exits early with a message if there are any processes running.

This requires installing and importing psutil, which is added to requirements.txt, so the initial pip3 install -r requirements.txt will install it in the virtual environment.

A couple of reasons we might not want this:

bitschmidty commented 5 years ago

I have a similar concern on the cross platform (windows) testing. We have not had any attendees say they are on windows yet, but could still happen.

Did you run into a scenario where there is a conflict with other bitcoind instances? @jnewbery

jachiang commented 5 years ago

Did you run into a scenario where there is a conflict with other bitcoind instances? @jnewbery

There is also this issue when running setup on multiple TestWrapper instances.

jnewbery commented 5 years ago

Rebased on master

Did you run into a scenario where there is a conflict with other bitcoind instances?

Not with the notebooks, but there have been issues in the past with the test framework where a running bitcoind instance is using a required resource (eg tcp port). I also think it's useful to warn the user if they're trying to run the notebook if they have a mainnet bitcoind instance running.

There is also this issue when running setup on multiple TestWrapper instances.

This shouldn't be possible now that #17 is merged.

jnewbery commented 5 years ago

I'm leaning towards not merging this before the workshops. I'd prefer not to require and additional dependency if possible.

Perhaps we can revisit after the workshops.

jnewbery commented 4 years ago

Rebased and merged. If this causes problems for people, it's an easy revert.