-
Notifications
You must be signed in to change notification settings - Fork 616
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
Move periodic timeout implementation to wsclient library. #3883
Merged
RichaGangwar
merged 45 commits into
aws:dev
from
RichaGangwar:ecs-agent-wsclient-periodic-timeout
Sep 5, 2023
Merged
Changes from 4 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
243d65b
wsclient: periodic timeout functionality addeed to wsclient
2ae064c
wsclient: edited comments
68b8a86
Fix static check failures
4520971
wsclient: new mock client and client_factory
fd249e9
wsclient: update tests using new mock wsclient and client_factory
c5695c1
wsclient: update the tcs handler in ecs-agent
ecdcded
Pass metricsfactory from handler
63401f8
Update vendor folder
61ceddb
Fix goimports
47a93e3
Move heartbeathandler back to acs,tcs
bfd7250
Updated mocks
034bb44
Updated unit tests.
a1f4839
Pass metricsFactory from acs session
2280263
Updated acs_handler tests to send new parameter to newsession function.
c29347a
Fix goimports
7c9ecb7
Add parameter to Do() in mock as Connect() is updated with parameter …
7deb4ad
Update test files with new parameters
924173f
Updated tests for wsclient, tcs, acs handlers
2ca9f02
Update metricsFactory.Done
2e6f077
Fixing goimports
0de2bb3
Fix acs handler test fail when passed timer as nil in mockwsclient
b5f5222
Fix acs client tests
31ed62a
Fix acs client tests
fadb396
Fix import order
f883a51
Add new tests
f5524b4
Fix import order
a15cc01
Fix go imports
8f91476
Fic acs handler tests
dee616b
Fic acs handler tests
2763c0c
Remove startTime from acs handler
36e6eca
Update acs tests
ff6de35
Fix static check failiures
7cdcb68
Fix unit test acs
60c9a5f
Update venfor directory
a304b44
Remove unnecessary metricsFactory
f1a60e8
Update error message from connection closure due to writeclosemessage
7e417d2
Update test messages
1d0cc8a
Update tests
ad67133
Return disconnect time in unit tests
d28b190
Handle review comments
69e60a9
Handle race condition in the TestPeriodicDisconnect
e9e4e3b
Minor changes to handle review comments
46f5aa5
Update vendor dir
4f57ed3
Goimports
90bf651
Fix test
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
14 changes: 11 additions & 3 deletions
14
agent/vendor/github.com/aws/amazon-ecs-agent/ecs-agent/wsclient/client.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit (non-blocking): Just curious, is there a specific reason why this assert statement was removed from this test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the test was flaky. The return code differs based on when the ctx is cancelled. If the context is cancelled when we are in client.consumeMessages, it results in non-nil error. But when the context is cancelled in starttelemetrysession(), it results in a nil error. Another way to test would be to test for either of the condition to be true. Let me try that out and i can re-add both the conditions in a later PR.