Skip to content

Commit

Permalink
contrib/net/http: fix flaky roundtrip test (#1249)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajgajg1134 committed Apr 20, 2022
1 parent fde953c commit 4128a7b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions contrib/net/http/roundtripper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,8 @@ func TestRoundTripperNetworkError(t *testing.T) {
defer mt.Stop()

s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
spanctx, err := tracer.Extract(tracer.HTTPHeadersCarrier(r.Header))
_, err := tracer.Extract(tracer.HTTPHeadersCarrier(r.Header))
assert.NoError(t, err)

span := tracer.StartSpan("test",
tracer.ChildOf(spanctx))
defer span.Finish()
time.Sleep(10 * time.Millisecond)
w.Write([]byte("Timeout"))
}))
Expand Down

0 comments on commit 4128a7b

Please sign in to comment.