-
Notifications
You must be signed in to change notification settings - Fork 112
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
Fix(dot/rpc/subscription): Implement WebSocket connection synchronization for testing #3399
Merged
axaysagathiya
merged 10 commits into
ChainSafe:development
from
axaysagathiya:issue-2944
Jul 25, 2023
Merged
Fix(dot/rpc/subscription): Implement WebSocket connection synchronization for testing #3399
axaysagathiya
merged 10 commits into
ChainSafe:development
from
axaysagathiya:issue-2944
Jul 25, 2023
Conversation
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
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## development #3399 +/- ##
===============================================
+ Coverage 50.98% 51.25% +0.26%
===============================================
Files 231 231
Lines 30600 30600
===============================================
+ Hits 15602 15683 +81
+ Misses 13337 13258 -79
+ Partials 1661 1659 -2 |
axaysagathiya
force-pushed
the
issue-2944
branch
from
July 22, 2023 19:32
c433f6f
to
2beb1d4
Compare
axaysagathiya
changed the title
Fix(dot/rpc/subscription): handle panic in test
Fix(dot/rpc/subscription): Implement WebSocket connection synchronization for testing
Jul 22, 2023
axaysagathiya
requested review from
edwardmack,
timwu20,
EclesioMeloJunior,
jimjbrettj,
kishansagathiya,
dimartiro and
kanishkatn
as code owners
July 22, 2023 20:54
EclesioMeloJunior
approved these changes
Jul 24, 2023
EclesioMeloJunior
requested changes
Jul 25, 2023
edwardmack
approved these changes
Jul 25, 2023
EclesioMeloJunior
approved these changes
Jul 25, 2023
🎉 This PR is included in version 0.8.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
inside the
setupWSConn
function, thehttptest.NewServer
function starts an HTTP server with a custom handler, but it returns immediately after the server has been started. In some cases, the WebSocket connection might not be fully established by the time the test code reaches atwskt.Wsconn.Close()
, resulting in a nil value for wskt.Wsconn, and the test fails.I have introduced a synchronization mechanism using a channel to ensure the WebSocket connection is fully established before proceeding with the test.
Tests
go test -tags integration github.com/ChainSafe/gossamer
Issues
Closes #2944
Primary Reviewer
@timwu20 @EclesioMeloJunior