HomePhabricator

[backports#18561#18633] test: Properly raise FailedToStartError when rpc…

Description

[backports#18561#18633] test: Properly raise FailedToStartError when rpc shutdown before warmup finished

Summary:
test: Properly raise FailedToStartError when rpc shutdown before warmup finished (MarcoFalke)

Pull request description:

Should fix issues such as https://travis-ci.org/github/bitcoin/bitcoin/jobs/671910152#L7034

https://github.com/bitcoin/bitcoin/pull/18561/commits/faede1b293354560317b67f0b4e6874dcac6ef41


[backport#18633] test: Properly raise FailedToStartError when rpc shutdown before warmup finished (take 2)

test: Properly raise FailedToStartError when rpc shutdown before warmup finished (take 2) (MarcoFalke)

Pull request description:

actually (?) fix #18561

See most recent traceback https://travis-ci.org/github/bitcoin/bitcoin/jobs/674668692#L7062

I believe the reason the error is still there is that ConnectionResetError is derived from OSError:

ConnectionResetError(ConnectionError(OSError))

And IOError is an alias for OSError since python 3.3, see https://docs.python.org/3/library/exceptions.html#IOError

So fix that by renaming IOError to the alias OSError and move the less specific catch clause down a few lines.

https://github.com/bitcoin/bitcoin/pull/18633/files


Backport of Core PR18561 and PR18633

Test Plan:

ninja
test_runner.py

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D7085

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Apr 9 2020, 14:21
majcostaCommitted on Jul 30 2020, 00:36
majcostaPushed on Jul 30 2020, 00:36
Reviewer
Restricted Project
Differential Revision
D7085: [backports#18561#18633] test: Properly raise FailedToStartError when rpc shutdown before warmup finished
Parents
rABC86af2d500565: [backport#17633] tests: Add option --valgrind to run the functional tests under…
Branches
Unknown
Tags
Unknown