Skip to content

Commit

Permalink
Fix vet
Browse files Browse the repository at this point in the history
  • Loading branch information
arjan-bal committed Aug 9, 2024
1 parent 747bd8a commit f6a52fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
10 changes: 0 additions & 10 deletions balancer/pickfirst_leaf/pickfirst_leaf.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ import (
"google.golang.org/grpc/serviceconfig"
)

const (
subConnListConnecting uint32 = iota
subConnListConnected
subConnListClosed
)

func init() {
balancer.Register(pickfirstBuilder{name: PickFirstLeafName})
if envconfig.NewPickFirstEnabled {
Expand Down Expand Up @@ -634,7 +628,3 @@ func (i *index) seekTo(needle *resolver.Address) bool {
}
return false
}

func (i *index) size() int {
return len(i.endpointList)
}
4 changes: 2 additions & 2 deletions test/pickfirst_leaf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func (s) TestPickFirstLeaf_ResolverUpdate(t *testing.T) {
t.Fatal(err)
}
bal := <-balChan
scs := bal.scStates
scs := bal.subConns()

if got, want := len(scs), len(tc.wantScStates); got != want {
t.Fatalf("len(subconns) = %d, want %d", got, want)
Expand Down Expand Up @@ -289,7 +289,7 @@ func (s) TestPickFirstLeaf_ResolverUpdate(t *testing.T) {
if err := pickfirst.CheckRPCsToBackend(ctx, cc, targetAddr); err != nil {
t.Fatal(err)
}
scs = bal.scStates
scs = bal.subConns()

if got, want := len(scs), len(tc.wantScStatesPostUpdate); got != want {
t.Fatalf("len(subconns) = %d, want %d", got, want)
Expand Down

0 comments on commit f6a52fc

Please sign in to comment.