Skip to content

Commit

Permalink
Merge branch 'andrew.glaude/fixHttpHost' of github.com:DataDog/dd-tra…
Browse files Browse the repository at this point in the history
…ce-go into andrew.glaude/fixHttpHost
  • Loading branch information
ajgajg1134 committed Jun 6, 2022
2 parents f3443fb + 4d43ac8 commit b690e30
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
16 changes: 8 additions & 8 deletions contrib/gofiber/fiber.v2/fiber_test.go
Expand Up @@ -32,7 +32,7 @@ func TestChildSpan(t *testing.T) {
})

r := httptest.NewRequest("GET", "/user/123", nil)
resp, err := router.Test(r, 100)
resp, err := router.Test(r)

finishedSpans := mt.FinishedSpans()

Expand All @@ -46,7 +46,7 @@ func TestTrace200(t *testing.T) {
r := httptest.NewRequest("GET", "/user/123", nil)

// do and verify the request
resp, err := router.Test(r, 100)
resp, err := router.Test(r)
assert.Equal(nil, err)
assert.Equal(resp.StatusCode, 200)

Expand Down Expand Up @@ -111,7 +111,7 @@ func TestStatusError(t *testing.T) {
})
r := httptest.NewRequest("GET", "/err", nil)

response, err := router.Test(r, 100)
response, err := router.Test(r)
assert.Equal(nil, err)
assert.Equal(response.StatusCode, 500)

Expand Down Expand Up @@ -142,7 +142,7 @@ func TestCustomError(t *testing.T) {
})
r := httptest.NewRequest("GET", "/err", nil)

response, err := router.Test(r, 100)
response, err := router.Test(r)
assert.Equal(nil, err)
assert.Equal(response.StatusCode, 400)

Expand Down Expand Up @@ -176,7 +176,7 @@ func TestUserContext(t *testing.T) {
})
r := httptest.NewRequest("GET", "/", nil)

router.Test(r, 100)
router.Test(r)

// verify both middleware span and router span finished
spans := mt.FinishedSpans()
Expand All @@ -192,7 +192,7 @@ func TestGetSpanNotInstrumented(t *testing.T) {
})
r := httptest.NewRequest("GET", "/ping", nil)

response, err := router.Test(r, 100)
response, err := router.Test(r)
assert.Equal(nil, err)
assert.Equal(response.StatusCode, 200)
}
Expand All @@ -213,7 +213,7 @@ func TestPropagation(t *testing.T) {
return c.SendString(c.Params("id"))
})

_, err := router.Test(r, 100)
_, err := router.Test(r)
assert.Equal(nil, err)
}

Expand All @@ -226,7 +226,7 @@ func TestAnalyticsSettings(t *testing.T) {
})

r := httptest.NewRequest("GET", "/user/123", nil)
router.Test(r, 100)
router.Test(r)

spans := mt.FinishedSpans()
assert.Len(t, spans, 1)
Expand Down
5 changes: 5 additions & 0 deletions contrib/internal/httptrace/httptrace_test.go
@@ -1,3 +1,8 @@
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016 Datadog, Inc.

package httptrace

import (
Expand Down
2 changes: 1 addition & 1 deletion ddtrace/tracer/metrics_test.go
Expand Up @@ -268,7 +268,7 @@ func TestReportHealthMetrics(t *testing.T) {
var tg testStatsdClient

defer func(old time.Duration) { statsInterval = old }(statsInterval)
statsInterval = time.Millisecond
statsInterval = time.Nanosecond

tracer, _, flush, stop := startTestTracer(t, withStatsdClient(&tg))
defer stop()
Expand Down

0 comments on commit b690e30

Please sign in to comment.