Skip to content

Commit

Permalink
xdsclient: improve authority watchers test
Browse files Browse the repository at this point in the history
  • Loading branch information
easwars committed Oct 7, 2022
1 parent c03925d commit cc51ec3
Show file tree
Hide file tree
Showing 6 changed files with 329 additions and 363 deletions.
353 changes: 0 additions & 353 deletions xds/internal/xdsclient/authority_test.go

This file was deleted.

8 changes: 6 additions & 2 deletions xds/internal/xdsclient/client_new.go
Expand Up @@ -75,8 +75,12 @@ func newWithConfig(config *bootstrap.Config, watchExpiryTimeout time.Duration, i
// Testing Only
//
// This function should ONLY be used for testing purposes.
func NewWithConfigForTesting(config *bootstrap.Config, watchExpiryTimeout time.Duration) (XDSClient, error) {
cl, err := newWithConfig(config, watchExpiryTimeout, defaultIdleAuthorityDeleteTimeout)
func NewWithConfigForTesting(config *bootstrap.Config, watchExpiryTimeout, authorityIdleTimeout time.Duration) (XDSClient, error) {
idleTimeout := defaultIdleAuthorityDeleteTimeout
if authorityIdleTimeout != time.Duration(0) {
idleTimeout = authorityIdleTimeout
}
cl, err := newWithConfig(config, watchExpiryTimeout, idleTimeout)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit cc51ec3

Please sign in to comment.