Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
123liuziming committed Oct 15, 2024
1 parent 9032d49 commit 3018135
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/nethttp/test_http_2.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func main() {
time.Sleep(1 * time.Second)
verifier.WaitAndAssertTraces(func(stubs []tracetest.SpanStubs) {
verifier.VerifyHttpClientAttributes(stubs[0][0], "POST", "POST", "https://127.0.0.1:"+strconv.Itoa(port)+"/a", "http", "1.1", "tcp", "ipv4", "", "127.0.0.1:"+strconv.Itoa(port), 200, 0, int64(port))
verifier.VerifyHttpServerAttributes(stubs[0][1], "POST /a", "POST", "https", "tcp", "ipv4", "", "127.0.0.1:"+strconv.Itoa(port), "Go-http-client/2.0", "http", "/a", "", "/a", 200)
verifier.VerifyHttpServerAttributes(stubs[0][1], "POST /a", "POST", "https", "tcp", "ipv4", "", "127.0.0.1:"+strconv.Itoa(port), "Go-http-client/2.0", "https", "/a", "", "/a", 200)
verifier.VerifyHttpClientAttributes(stubs[0][2], "GET", "GET", "http://127.0.0.1:"+strconv.Itoa(port)+"/b", "http", "1.1", "tcp", "ipv4", "", "127.0.0.1:"+strconv.Itoa(port), 400, 0, int64(port))
if stubs[0][1].Parent.TraceID().String() != stubs[0][0].SpanContext.TraceID().String() {
log.Fatal("span 1 should be child of span 0")
Expand Down
4 changes: 2 additions & 2 deletions test/zap/test_zap.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ func main() {
time.Sleep(1 * time.Second)
verifier.WaitAndAssertTraces(func(stubs []tracetest.SpanStubs) {
verifier.VerifyHttpClientAttributes(stubs[0][0], "GET", "GET", "http://127.0.0.1:"+strconv.Itoa(port)+"/a", "http", "1.1", "tcp", "ipv4", "", "127.0.0.1:"+strconv.Itoa(port), 200, 0, int64(port))
verifier.VerifyHttpServerAttributes(stubs[0][1], "GET /a", "GET", "http", "tcp", "ipv4", "", "127.0.0.1:"+strconv.Itoa(port), "Go-http-client/1.1", "", "/a", "", "/a", 200)
verifier.VerifyHttpServerAttributes(stubs[0][1], "GET /a", "GET", "http", "tcp", "ipv4", "", "127.0.0.1:"+strconv.Itoa(port), "Go-http-client/1.1", "http", "/a", "", "/a", 200)
verifier.VerifyHttpClientAttributes(stubs[0][2], "GET", "GET", "http://127.0.0.1:"+strconv.Itoa(port)+"/b", "http", "1.1", "tcp", "ipv4", "", "127.0.0.1:"+strconv.Itoa(port), 200, 0, int64(port))
verifier.VerifyHttpServerAttributes(stubs[0][3], "GET /b", "GET", "http", "tcp", "ipv4", "", "127.0.0.1:"+strconv.Itoa(port), "Go-http-client/1.1", "", "/b", "", "/b", 200)
verifier.VerifyHttpServerAttributes(stubs[0][3], "GET /b", "GET", "http", "tcp", "ipv4", "", "127.0.0.1:"+strconv.Itoa(port), "Go-http-client/1.1", "http", "/b", "", "/b", 200)
if stubs[0][1].Parent.TraceID().String() != stubs[0][0].SpanContext.TraceID().String() {
log.Fatal("span 1 should be child of span 0")
}
Expand Down

0 comments on commit 3018135

Please sign in to comment.