Page MenuHomeSoftware Heritage

test_rpc_client: Add missing RPCClient exception handling tests
ClosedPublic

Authored by anlambert on Nov 20 2020, 3:13 PM.

Details

Summary

Related to D4542, those missing tests let a mistake pass through.

Update: I also add tests for backward compatibility with old encoded exception schema and I found another bug that I fixed in a dedicated commit.

Updated coverage report for impacted source file: https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/152/coverage/cobertura__coverage_xml/project/api/api___init___py/

Diff Detail

Repository
rDCORE Foundations and core functionalities
Branch
rpc-client-exception-tests
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17334
Build 26777: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 26776: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D4546 (id=16120)

Rebasing onto 7722df9f29...

First, rewinding head to replay your work on top of it...
Applying: test_rpc_client: Add missing RPCClient exception handling tests
Changes applied before test
commit 7fb0447eca6dc3607eec0f1b8287a3344232c779
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Fri Nov 20 15:09:26 2020 +0100

    test_rpc_client: Add missing RPCClient exception handling tests

See https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/149/ for more details.

Update: Fix a backward compatibility issue with old encoded exception schema and update tests accordingly

Build is green

Patch application report for D4546 (id=16134)

Rebasing onto a64357b272...

First, rewinding head to replay your work on top of it...
Applying: RPCClient: Ensure backward compatibility with old encoded exception schema
Applying: test_rpc_client: Add missing RPCClient exception handling tests
Changes applied before test
commit 61e04f931c1f8de0a234af7aaba232e10c72cb55
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Fri Nov 20 16:27:44 2020 +0100

    test_rpc_client: Add missing RPCClient exception handling tests

commit a88edcac73e9278eb89893e157917ae07be00028
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Fri Nov 20 16:27:14 2020 +0100

    RPCClient: Ensure backward compatibility with old encoded exception schema

See https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/152/ for more details.

vlorentz added a subscriber: vlorentz.

Cool, thanks!

swh/core/api/tests/test_rpc_client.py
148–150

with a docstring, explaining it raises a generic RemoteException because Exception isn't whitelisted

This revision is now accepted and ready to land.Nov 20 2020, 11:11 PM

Update: Rebase, improve TODO comments and add docstrings for new tests.

Build is green

Patch application report for D4546 (id=16161)

Rebasing onto a64357b272...

Current branch diff-target is up to date.
Changes applied before test
commit ea81c12f2603fe936f1ca2f133eb106984edc307
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Fri Nov 20 16:27:44 2020 +0100

    test_rpc_client: Add missing RPCClient exception handling tests

commit 47b5ab1ad5c970d2beb5e8e03b7da5d2fe56099e
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Fri Nov 20 16:27:14 2020 +0100

    RPCClient: Ensure backward compatibility with old encoded exception schema

See https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/155/ for more details.

Build is green

Patch application report for D4546 (id=16162)

Rebasing onto a64357b272...

Current branch diff-target is up to date.
Changes applied before test
commit 7b38110bcaa0a014f1befa98d5b693b5825e7e85
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Fri Nov 20 16:27:44 2020 +0100

    test_rpc_client: Add missing RPCClient exception handling tests

commit 47b5ab1ad5c970d2beb5e8e03b7da5d2fe56099e
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Fri Nov 20 16:27:14 2020 +0100

    RPCClient: Ensure backward compatibility with old encoded exception schema

See https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/156/ for more details.