Skip to content

Commit

Permalink
resolver: use t.Name() instead of a const scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
searKing committed Sep 19, 2023
1 parent e8fe6ad commit 55f2b24
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,13 @@ func (s) TestResolverAddressesToEndpoints(t *testing.T) {

// TestResolverAddressesWithTypedNilAttribute ensures no panic if typed-nil attributes within resolver.State.Addresses
func (s) TestResolverAddressesWithTypedNilAttribute(t *testing.T) {
const scheme = "testresolveraddresseswithtypednilattribute"
r := manual.NewBuilderWithScheme(scheme)
r := manual.NewBuilderWithScheme(t.Name())
resolver.Register(r)

addrAttr := attributes.New("typed_nil", (*stringerVal)(nil))
r.InitialState(resolver.State{Addresses: []resolver.Address{{Addr: "addr1", Attributes: addrAttr}}})

cc, err := Dial(r.Scheme()+":///",
WithTransportCredentials(insecure.NewCredentials()),
WithResolvers(r))
cc, err := Dial(r.Scheme()+":///", WithTransportCredentials(insecure.NewCredentials()), WithResolvers(r))
if err != nil {
t.Fatalf("Unexpected error dialing: %v", err)
}
Expand Down

0 comments on commit 55f2b24

Please sign in to comment.