(t *testing.T)
| 77 | } |
| 78 | |
| 79 | func TestClient_race(t *testing.T) { |
| 80 | // the mock tracer is not concurrent safe. |
| 81 | // tracer := opentracing.GlobalTracer() |
| 82 | tracer := opentracing.NoopTracer{} |
| 83 | client := NewClient(tracer) |
| 84 | for i := 0; i < 100; i++ { |
| 85 | t.Run("", func(t *testing.T) { |
| 86 | t.Parallel() |
| 87 | r, _ := http.NewRequest("GET", "https://example.com/", nil) |
| 88 | resp, _ := client.Do(r) |
| 89 | defer resp.Body.Close() |
| 90 | }) |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | func TestClient_context(t *testing.T) { |
| 95 | ctx := context.Background() |