From b2a517bda184b183a206dbf0e3b8104cf1802ebe Mon Sep 17 00:00:00 2001 From: Yang Song Date: Wed, 11 Sep 2019 10:04:53 -0700 Subject: [PATCH] Use endpoint instead of connection in equivalence_test (#207) --- equivalence_test.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/equivalence_test.go b/equivalence_test.go index 29475bc..0a704d3 100644 --- a/equivalence_test.go +++ b/equivalence_test.go @@ -132,17 +132,10 @@ func TestEquivalenceStatsVsMetricsUploads(t *testing.T) { server, addr, doneFn := createFakeServer(t) defer doneFn() - // Now create a gRPC connection to the agent. - conn, err := grpc.Dial(addr, grpc.WithInsecure()) - if err != nil { - t.Fatalf("Failed to make a gRPC connection to the agent: %v", err) - } - defer conn.Close() - // Finally create the OpenCensus stats exporter exporterOptions := Options{ ProjectID: "equivalence", - MonitoringClientOptions: []option.ClientOption{option.WithGRPCConn(conn)}, + MonitoringClientOptions: []option.ClientOption{option.WithEndpoint(addr)}, // Setting this time delay threshold to a very large value // so that batching is performed deterministically and flushing is