Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

tests(websocket): websocket integration tests #1355

Merged
merged 9 commits into from
Oct 28, 2022

Conversation

adisaran64
Copy link
Contributor

@adisaran64 adisaran64 commented Sep 21, 2022

Closes: #1241

Description

added skeleton for websocket tests, cannot implement with current version of web3.py
along with #1342 , closes #1241


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@github-actions github-actions bot added the Type: Tests issues and PR related to tests label Sep 21, 2022
@adisaran64 adisaran64 marked this pull request as ready for review September 21, 2022 06:25
@adisaran64 adisaran64 requested a review from a team as a code owner September 21, 2022 06:25
@adisaran64 adisaran64 requested review from hanchon and austinchandra and removed request for a team September 21, 2022 06:25
Copy link
Contributor

@danburck danburck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adisaran64 can you add some tests for some the rpc calls, e.g. getBlockNumber (https://ethereum.org/en/developers/tutorials/using-websockets/) ? Or is the batch request blocking you to do this?

It would helpful to add one example of what you can query with websockets here: https://docs.evmos.org/developers/clients.html#ethereum-websocket

tests/integration_tests/test_websockets.py Outdated Show resolved Hide resolved
@fedekunze
Copy link
Contributor

@adisaran64 what's the status of this PR?

@fedekunze fedekunze marked this pull request as draft October 19, 2022 13:06
@adisaran64 adisaran64 marked this pull request as ready for review October 20, 2022 12:21
@adisaran64
Copy link
Contributor Author

@danburck modified the test_types.py file to test the ethermint websocket along with the RPC, so that all rpc calls currently tested are also tested on the websocket. will open a PR to add that example. fixed flake issues as well, needed to ignore some clashing rulesets (long lines vs. line breaks)

@fedekunze fedekunze requested review from danburck and facs95 October 20, 2022 21:18
@hanchon
Copy link
Contributor

hanchon commented Oct 27, 2022

LGTM, tested it locally and it's working fine. The most useful part is the fixture with the normal rpc and the websocket (ethermint_rpc_ws )

@fedekunze fedekunze enabled auto-merge (squash) October 28, 2022 07:53
@fedekunze fedekunze merged commit 64cfb87 into main Oct 28, 2022
@fedekunze fedekunze deleted the adisaran64/nix-websocket-test-suite branch October 28, 2022 08:10
@danburck danburck mentioned this pull request Nov 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Tests issues and PR related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration test - JSON-RPC Websockets
5 participants