Page MenuHomeSoftware Heritage

test_storage: Fix some RPC tests after recent changes in swh-core
AbandonedPublic

Authored by anlambert on Feb 17 2020, 5:50 PM.

Details

Reviewers
vlorentz
Group Reviewers
Reviewers
Summary

Remote exception handling has changed since rDCORE08289ce5c33e507ec3ce80cade86f688b4107f3f

Diff Detail

Repository
rDCIDX Metadata indexer
Branch
fix-rpc-tests
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 10640
Build 15942: tox-on-jenkinsJenkins
Build 15941: arc lint + arc unit

Event Timeline

I guess we should have the RPC client/server pair re-raise ValueErrors? @vlorentz?

In D2685#64238, @olasd wrote:

I guess we should have the RPC client/server pair re-raise ValueErrors? @vlorentz?

RemoteException means an unexpected server error (http code 500).

As those errors are client errors, I think we should use another class. reraising ValueError is a bad option, because server errors may raise those too. Instead, we should add a new exception type, and raise that one.

This revision now requires changes to proceed.Feb 18 2020, 3:10 PM