-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add pagination for nodes and channels rpc
- Loading branch information
1 parent
c342ab1
commit 048e60b
Showing
10 changed files
with
275 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
meta { | ||
name: Node1 send get_nodes rpc request | ||
type: http | ||
seq: 18 | ||
} | ||
|
||
post { | ||
url: {{NODE1_RPC_URL}} | ||
body: json | ||
auth: none | ||
} | ||
|
||
headers { | ||
Content-Type: application/json | ||
Accept: application/json | ||
} | ||
|
||
body:json { | ||
{ | ||
"id": "42", | ||
"jsonrpc": "2.0", | ||
"method": "graph_nodes", | ||
"params": [{ | ||
"limit": 2 | ||
}] | ||
} | ||
} | ||
|
||
assert { | ||
res.body.error: isUndefined | ||
} | ||
|
||
script:pre-request { | ||
// sleep for a while | ||
await new Promise(r => setTimeout(r, 1000)); | ||
} | ||
|
||
script:post-response { | ||
// Sleep for sometime to make sure current operation finishes before next request starts. | ||
await new Promise(r => setTimeout(r, 100)); | ||
console.log("get result: ", res.body.result); | ||
if (res.body.result.nodes.length != 2) { | ||
throw new Error("Assertion failed: nodes number is not right"); | ||
} | ||
bru.setVar("last_cursor", res.body.result.last_cursor); | ||
} |
Oops, something went wrong.