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 #6907

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

Conversation

UlyanaAndrukhiv
Copy link
Contributor

@UlyanaAndrukhiv UlyanaAndrukhiv commented Jan 16, 2025

Closes: #6641

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. The tests cover the following scenarios:

  1. Happy paths:
  • Subscribing to any topic, ensuring a successful subscription response and expected results.
  • Unsubscribing from a topic successfully.
  1. Error cases:
  • Attempting to subscribe with invalid data.
  • Attempting to unsubscribe with invalid data.
  1. Additional behaviors:
  • Retrieving a list of all active subscriptions.
  • Verifying client inactivity tracking and connection loss handling.

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
Guitarheroua and others added 22 commits January 13, 2025 15:30
Client is not required to provide valid UUID for
subscription ID from now on. It can be any string
[1-20] characters long.

If no subscription ID provided, server creates
UUID string for it.
…isarchuk/6573-pending-should-return-immediately
…' of github.com:The-K-R-O-K/flow-go into UlianaAndrukhiv/6641-websockets-integration-tests
…' of github.com:The-K-R-O-K/flow-go into UlianaAndrukhiv/6641-websockets-integration-tests
…and uncommented integration test for transaction statuses
…' of github.com: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 54.41176% with 248 lines in your changes missing coverage. Please review.

Project coverage is 41.00%. Comparing base (0d2b34f) to head (b5b9f2f).
Report is 17 commits behind head on master.

Files with missing lines Patch % Lines
.../access/rpc/backend/backend_stream_transactions.go 63.35% 39 Missing and 9 partials ⚠️
storage/mock/batch.go 0.00% 46 Missing ⚠️
storage/mock/db.go 0.00% 44 Missing ⚠️
engine/access/rest/websockets/controller.go 68.67% 23 Missing and 3 partials ⚠️
engine/access/rest/common/utils.go 47.91% 24 Missing and 1 partial ⚠️
engine/access/rest/websockets/subscription_id.go 52.17% 8 Missing and 3 partials ⚠️
...st/websockets/data_providers/mock/data_provider.go 47.05% 6 Missing and 3 partials ⚠️
engine/access/rest/util/converter.go 0.00% 8 Missing ⚠️
...ckets/data_providers/mock/data_provider_factory.go 25.00% 3 Missing and 3 partials ⚠️
.../rest/websockets/data_providers/events_provider.go 61.53% 4 Missing and 1 partial ⚠️
... and 10 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6907      +/-   ##
==========================================
- Coverage   41.11%   41.00%   -0.11%     
==========================================
  Files        2116     2122       +6     
  Lines      185737   185912     +175     
==========================================
- Hits        76368    76240     -128     
- Misses     102952   103255     +303     
  Partials     6417     6417              
Flag Coverage Δ
unittests 41.00% <54.41%> (-0.11%) ⬇️

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.

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