The qt tests don’t need to bind to the regtest port. By not binding, it will no longer conflict with existing regtest instances and the tests will run as normal.
Fixes #10
ACK a9d1ddd91dc20332033d09869afee76ff6f281b8
Confirming the behavior cited in #10 on master
. Also confirming that this PR
fixes it.
Tested on macOS 11.2 Qt 5.15.2 using the QT_QPA_PLATFORM=cocoa ./test_bitcoin-qt
work around.
I setup a node running bitcoin-qt -regtest
, then setup two instances of the test to run at the same time. Everything ran smoothly and the blocking behavior was not encountered.
53@@ -54,6 +54,7 @@ int main(int argc, char* argv[])
54
55 NodeContext node_context;
56 std::unique_ptr<interfaces::Node> node = interfaces::MakeNode(&node_context);
57+ gArgs.ForceSetArg("-listen", "0");
Same for listenonion?
f.write("listenonion=0\n")
f.write("discover=0\n")
f.write("dnsseed=0\n")
f.write("fixedseeds=0\n")
f.write("upnp=0\n")
f.write("natpmp=0\n")
I think this change prevents an opportunity to test Qt signals and UI response when new block/tx arrives.
(that, of course, will require to spin up another node)
The qt tests don't need to bind to the regtest port. By not binding, it
will no longer conflict with existing regtest instances and the tests
will run as normal.
I think this change prevents an opportunity to test Qt signals and UI response when new block/tx arrives.
(that, of course, will require to spin up another node)
In that case, -port
can be overridden. In any case, I don’t think that we should reject this just because there might be a change in the future that conflicts with it.
cr ACK e21276a82a9996c73e43990ccf927397f71399ea
didn’t test
53@@ -54,6 +54,13 @@ int main(int argc, char* argv[])
54
55 NodeContext node_context;
56 std::unique_ptr<interfaces::Node> node = interfaces::MakeNode(&node_context);
57+ gArgs.ForceSetArg("-listen", "0");
Passing 0 to port
lets the system assign a free port number. This fixes the issue while allowing for future GUI tests that involve interactions with another node.
0 gArgs.ForceSetArg("-port", "0");
achow101
jarolrod
MarcoFalke
hebasto
Labels
Tests