-
Notifications
You must be signed in to change notification settings - Fork 4.5k
xds: generic xds client ads stream tests #8307
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
xds: generic xds client ads stream tests #8307
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8307 +/- ##
==========================================
+ Coverage 82.22% 82.30% +0.07%
==========================================
Files 419 419
Lines 41954 42025 +71
==========================================
+ Hits 34497 34589 +92
+ Misses 5995 5979 -16
+ Partials 1462 1457 -5
🚀 New features to boost your workflow:
|
@@ -123,6 +123,12 @@ func (c *XDSClient) SetWatchExpiryTimeoutForTesting(watchExpiryTimeout time.Dura | |||
c.watchExpiryTimeout = watchExpiryTimeout | |||
} | |||
|
|||
// SetStreamBackOffForTesting override the default stream backoff function | |||
// with provided function. | |||
func (c *XDSClient) SetStreamBackOffForTesting(streamBackoff func(int) time.Duration) { |
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.
Please put this in an internal
subdirectory and set it to an unexported function here.
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.
Done for both expiry and backoff
900a1bf
to
ffe6b75
Compare
ffe6b75
to
b9afcfa
Compare
b9afcfa
to
72bdea5
Compare
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.
I am going to defer to @easwars to review this since he has a lot more experience/familiarity with the original xdsclient and its tests.
@@ -0,0 +1,275 @@ | |||
/* | |||
* | |||
* Copyright 2024 gRPC authors. |
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.
Is this moved from elsewhere? You have several "new" files with 2024, so unless they're copies, please update.
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.
yeah this is copied from internal and then modified. Similar to how done in previous PRs
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.
I see. That should make it a lot easier to review @easwars.
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.
These tests needs to be deleted from internal xdsclient as part of migration PR #8310 as they need to override internal resource watching implementation.
xds/internal/clients/xdsclient/test/ads_stream_flow_control_test.go
Outdated
Show resolved
Hide resolved
xds/internal/clients/xdsclient/test/ads_stream_flow_control_test.go
Outdated
Show resolved
Hide resolved
3956e5b
to
19248d1
Compare
RELEASE NOTES: None