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

[Access] Implement integration test for new websockets [WIP] #6907

Draft
wants to merge 121 commits into
base: master
Choose a base branch
from

Conversation

UlyanaAndrukhiv
Copy link
Contributor

@UlyanaAndrukhiv UlyanaAndrukhiv commented Jan 16, 2025

Closes: #6641, #6876

Note: This PR should be reviewed and merged only after the following PRs are merged:

Context

This pull request adds integration tests to verify the functionality of the new WebSockets implementation and incorporates the following updates:

  1. Fixes from integration test results.
    Errors identified during integration testing have been resolved, ensuring stable and expected behavior for all supported scenarios.

  2. Max subscriptions per connection functionality.
    The functionality has been implemented, enforcing a limit on the number of active subscriptions allowed per Websocket connection.

  3. Integration test scenarios:

  • Happy paths:

    • Subscribing to any topic, ensuring a successful subscription response and expected results.
    • Unsubscribing from a topic successfully.
  • Error cases:

    • Attempting to subscribe with invalid data.
    • Attempting to unsubscribe with invalid data.
  • Additional behaviors:

    • Retrieving a list of all active subscriptions.
    • Verifying client inactivity tracking and connection loss handling.
    • Verifying the Websockets MaxSubscriptionsPerConnection limits functionality

Guitarheroua and others added 30 commits November 15, 2024 15:18
…The-K-R-O-K/flow-go into UlianaAndrukhiv/6641-websockets-integration-tests
…:The-K-R-O-K/flow-go into UlianaAndrukhiv/6641-websockets-integration-tests
@codecov-commenter
Copy link

codecov-commenter commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 60.88083% with 151 lines in your changes missing coverage. Please review.

Project coverage is 41.01%. Comparing base (ce0396a) to head (fe304e1).

Files with missing lines Patch % Lines
.../access/rpc/backend/backend_stream_transactions.go 63.35% 39 Missing and 9 partials ⚠️
engine/access/rest/common/utils.go 47.91% 24 Missing and 1 partial ⚠️
engine/access/rest/websockets/controller.go 58.33% 19 Missing and 1 partial ⚠️
cmd/access/node_builder/access_node_builder.go 0.00% 10 Missing ⚠️
cmd/observer/node_builder/observer_builder.go 0.00% 10 Missing ⚠️
engine/access/rest/util/converter.go 0.00% 8 Missing ⚠️
.../rest/websockets/data_providers/events_provider.go 61.53% 4 Missing and 1 partial ⚠️
...st/websockets/data_providers/mock/data_provider.go 61.53% 2 Missing and 3 partials ⚠️
access/api.go 0.00% 4 Missing ⚠️
...ockets/data_providers/account_statuses_provider.go 72.72% 2 Missing and 1 partial ⚠️
... and 8 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6907      +/-   ##
==========================================
- Coverage   41.07%   41.01%   -0.07%     
==========================================
  Files        2120     2121       +1     
  Lines      185958   185987      +29     
==========================================
- Hits        76384    76276     -108     
- Misses     103156   103294     +138     
+ Partials     6418     6417       -1     
Flag Coverage Δ
unittests 41.01% <60.88%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Guitarheroua Guitarheroua changed the title [Access] Implement integration test for new websockets [Access] Implement integration test for new websockets [WIP] Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Access] Implement integration test for new websockets
6 participants