diff --git a/internal/binarylog/binarylog_end2end_test.go b/internal/binarylog/binarylog_end2end_test.go index 6d25f1be..3f555dcf 100644 --- a/internal/binarylog/binarylog_end2end_test.go +++ b/internal/binarylog/binarylog_end2end_test.go @@ -822,18 +822,12 @@ func equalLogEntry(entries ...*pb.GrpcLogEntry) (equal bool) { e.CallId = 0 // CallID is global to the binary, hard to compare. if h := e.GetClientHeader(); h != nil { h.Timeout = nil - tmp := h.Metadata.Entry[:0] - for _, e := range h.Metadata.Entry { - tmp = append(tmp, e) - } + tmp := append(h.Metadata.Entry[:0], h.Metadata.Entry...) h.Metadata.Entry = tmp sort.Slice(h.Metadata.Entry, func(i, j int) bool { return h.Metadata.Entry[i].Key < h.Metadata.Entry[j].Key }) } if h := e.GetServerHeader(); h != nil { - tmp := h.Metadata.Entry[:0] - for _, e := range h.Metadata.Entry { - tmp = append(tmp, e) - } + tmp := append(h.Metadata.Entry[:0], h.Metadata.Entry...) h.Metadata.Entry = tmp sort.Slice(h.Metadata.Entry, func(i, j int) bool { return h.Metadata.Entry[i].Key < h.Metadata.Entry[j].Key }) } diff --git a/test/healthcheck_test.go b/test/healthcheck_test.go index d579deb8..82133b0d 100644 --- a/test/healthcheck_test.go +++ b/test/healthcheck_test.go @@ -156,9 +156,7 @@ func setupClient(c *clientConfig) (cc *grpc.ClientConn, r *manual.Resolver, defe if c.testHealthCheckFuncWrapper != nil { opts = append(opts, internal.WithHealthCheckFunc.(func(internal.HealthChecker) grpc.DialOption)(c.testHealthCheckFuncWrapper)) } - for _, dopt := range c.extraDialOption { - opts = append(opts, dopt) - } + opts = append(opts, c.extraDialOption...) cc, err = grpc.Dial(r.Scheme()+":///test.server", opts...) if err != nil { rcleanup()