Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion trace/otlp.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ func NewOtlpGrpcClientConnection(ctx context.Context, host string, dialOptions .

dialContextOptions := []grpc.DialOption{
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithBlock(),
}

dialContextOptions = append(dialContextOptions, dialOptions...)
Expand Down
7 changes: 6 additions & 1 deletion trace/otlp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func TestNewOtlpGrpcInsecureConnectionSuccess(t *testing.T) {
context.Background(),
"bufnet",
grpc.WithContextDialer(bufDialer),
grpc.WithBlock(),
)
assert.NoError(t, err)

Expand All @@ -51,7 +52,11 @@ func TestNewOtlpGrpcInsecureConnectionError(t *testing.T) {
ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(1*time.Microsecond))
defer cancel()

_, err := trace.NewOtlpGrpcClientConnection(ctx, "https://example.com")
_, err := trace.NewOtlpGrpcClientConnection(
ctx,
"https://example.com",
grpc.WithBlock(),
)
assert.Error(t, err)
assert.Contains(t, err.Error(), "context deadline exceeded")
}
Loading