Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Add regtest for JSON-RPC batch calls #14777

Merged
merged 1 commit into from Nov 22, 2018

Conversation

Projects
None yet
6 participants
@domob1812
Copy link
Contributor

commented Nov 21, 2018

This adds a new regtest file interface_rpc.py, containing a test for batch JSON-RPC requests. Those were previously not tested at all. Tests for basic requests are not really necessary, as those are used anyway in lots of other regtests.

The existing interface_http.py file is more about the underlying HTTP connection, so adding a new interface file for the JSON-RPC specific things makes sense.

@promag
Copy link
Member

left a comment

Have you considered adding batch support to AuthServiceProxy?

Edit: nervermind, see @laanwj comment below #14777 (review).

Show resolved Hide resolved test/functional/interface_rpc.py Outdated

@fanquake fanquake added the Tests label Nov 21, 2018

@laanwj

This comment has been minimized.

Copy link
Member

commented Nov 21, 2018

There's a test for batching added in 4526d21, but it's part of the wallet tests so adding a general one is probably good.

Show resolved Hide resolved test/functional/interface_rpc.py Outdated

@domob1812 domob1812 force-pushed the domob1812:batch-rpc branch 2 times, most recently Nov 21, 2018

Show resolved Hide resolved test/functional/interface_rpc.py Outdated

@domob1812 domob1812 force-pushed the domob1812:batch-rpc branch Nov 21, 2018

@laanwj

This comment has been minimized.

Copy link
Member

commented Nov 21, 2018

utACK 06ffc4b19b8ca8a8173caf5d3e90d0651e22d72d

@promag
Copy link
Member

left a comment

utACK 06ffc4b, just some nits.

Show resolved Hide resolved test/functional/interface_rpc.py Outdated
Show resolved Hide resolved test/functional/interface_rpc.py Outdated
Show resolved Hide resolved test/functional/interface_rpc.py

@domob1812 domob1812 force-pushed the domob1812:batch-rpc branch Nov 21, 2018

@promag

This comment has been minimized.

Copy link
Member

commented Nov 21, 2018

Where is Travis?

@domob1812 domob1812 force-pushed the domob1812:batch-rpc branch Nov 21, 2018

@promag
Copy link
Member

left a comment

Thanks for the quick fixes @domob1812, looks great! just left 2 more comments.

Show resolved Hide resolved test/functional/interface_rpc.py
Show resolved Hide resolved test/functional/interface_rpc.py Outdated
Add regtest for JSON-RPC batch calls.
This adds a new regtest file 'interface_rpc.py', containing a test for
batch JSON-RPC requests.  Those were previously not tested at all.  Tests
for basic requests are not really necessary, as those are used anyway
in lots of other regtests.

The existing interface_http.py file is more about the underlying HTTP
connection, so adding a new interface file for the JSON-RPC specific
things makes sense.

@domob1812 domob1812 force-pushed the domob1812:batch-rpc branch to 3d2c7d6 Nov 21, 2018

@promag

This comment has been minimized.

Copy link
Member

commented Nov 21, 2018

utACK 3d2c7d6.

@Empact

This comment has been minimized.

Copy link
Member

commented Nov 22, 2018

utACK 3d2c7d6

@MarcoFalke MarcoFalke merged commit 3d2c7d6 into bitcoin:master Nov 22, 2018

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details

MarcoFalke added a commit that referenced this pull request Nov 22, 2018

Merge #14777: tests: Add regtest for JSON-RPC batch calls
3d2c7d6 Add regtest for JSON-RPC batch calls. (Daniel Kraft)

Pull request description:

  This adds a new regtest file `interface_rpc.py`, containing a test for batch JSON-RPC requests.  Those were previously not tested at all.  Tests for basic requests are not really necessary, as those are used anyway in lots of other regtests.

  The existing `interface_http.py` file is more about the underlying HTTP connection, so adding a new interface file for the JSON-RPC specific things makes sense.

Tree-SHA512: 7c7576004c8474e23c98f4bf25fb655328ba6bb73ea06744ebee1c0ffbb26bc132e621ae52955d51dab0803b322f8d711667626a777ac9b26003339c2484502f

@domob1812 domob1812 deleted the domob1812:batch-rpc branch Nov 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.