Page MenuHomePhabricator

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

Authored by majcosta on Wed, Jul 29, 18:49.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

majcosta created this revision.Wed, Jul 29, 18:49
Herald added a reviewer: Restricted Project. · View Herald TranscriptWed, Jul 29, 18:49
majcosta requested review of this revision.Wed, Jul 29, 18:49
teamcity edited the summary of this revision. (Show Details)Wed, Jul 29, 18:49

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

majcosta edited the summary of this revision. (Show Details)Wed, Jul 29, 19:02
Fabien accepted this revision.Wed, Jul 29, 21:26
This revision is now accepted and ready to land.Wed, Jul 29, 21:26
This revision was landed with ongoing or failed builds.Thu, Jul 30, 00:36
This revision was automatically updated to reflect the committed changes.