go net/http:测试传输请求写入往返失败

wooyq4lh  于 3个月前  发布在  Go
关注(0)|答案(4)|浏览(34)
#!watchflakes
post <- pkg == "net/http" && log ~ `WARNING: DATA RACE` && log ~ `net/http_test.testServerExpect`

自动创建的问题以收集这些故障。
示例( log ):

--- FAIL: TestTransportRequestWriteRoundTrip (0.00s)
    --- FAIL: TestTransportRequestWriteRoundTrip/h2 (0.36s)
        --- FAIL: TestTransportRequestWriteRoundTrip/h2/buffer,_length_-1 (0.05s)
            testing.go:1465: race detected during execution of test
        testing.go:1465: race detected during execution of test
    --- FAIL: TestTransportRequestWriteRoundTrip/h1 (0.40s)
        --- FAIL: TestTransportRequestWriteRoundTrip/h1/buffer,_length_-1 (0.04s)
            testing.go:1465: race detected during execution of test
        testing.go:1465: race detected during execution of test

watchflakes

sqxo8psd

sqxo8psd1#

找到新的 Jmeter 板测试碎片:

#!watchflakes
post <- pkg == "net/http" && test == "TestTransportRequestWriteRoundTrip"

2023-04-28 01:33 linux-amd64-race go@71ad46cd net/http.TestTransportRequestWriteRoundTrip ( log )

--- FAIL: TestTransportRequestWriteRoundTrip (0.00s)
    --- FAIL: TestTransportRequestWriteRoundTrip/h2 (0.36s)
        --- FAIL: TestTransportRequestWriteRoundTrip/h2/buffer,_length_-1 (0.05s)
            testing.go:1465: race detected during execution of test
        testing.go:1465: race detected during execution of test
    --- FAIL: TestTransportRequestWriteRoundTrip/h1 (0.40s)
        --- FAIL: TestTransportRequestWriteRoundTrip/h1/buffer,_length_-1 (0.04s)
            testing.go:1465: race detected during execution of test
        testing.go:1465: race detected during execution of test

watchflakes

42fyovps

42fyovps2#

https://go.dev/cl/490255提到了这个问题:net/http: avoid leaking the writing goroutine

gmol1639

gmol16393#

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "net/http" && test == "TestTransportRequestWriteRoundTrip"

2023-05-10 22:55 darwin-amd64-13 go@3d80d57c net/http.TestTransportRequestWriteRoundTrip ( log )

--- FAIL: TestTransportRequestWriteRoundTrip (0.00s)
    --- FAIL: TestTransportRequestWriteRoundTrip/h2 (19.00s)
        --- FAIL: TestTransportRequestWriteRoundTrip/h2/file,_length (17.10s)
            transport_test.go:6037: Put "https://127.0.0.1:50400": write tcp 127.0.0.1:50401->127.0.0.1:50400: write: broken pipe

watchflakes

qv7cva1a

qv7cva1a4#

找到了新的 Jmeter 板测试碎片:

#!watchflakes
post <- pkg == "net/http" && log ~ `WARNING: DATA RACE` && log ~ `net/http_test.testServerExpect`

2023-07-06 19:41 linux-amd64-race go@312920c0 net/http.TestOnlyWriteTimeout ( log )

==================
WARNING: DATA RACE
Read at 0x00c0004d81e3 by goroutine 12452:
  testing.(*common).logDepth()
      /workdir/go/src/testing/testing.go:998 +0x4c4
  testing.(*common).log()
      /workdir/go/src/testing/testing.go:985 +0xa4
  testing.(*common).Logf()
      /workdir/go/src/testing/testing.go:1036 +0x6a
  net/http_test.testServerExpect.func2.1()
...
  testing.(*M).Run()
      /workdir/go/src/testing/testing.go:1906 +0xb44
  net/http_test.TestMain()
      /workdir/go/src/net/http/main_test.go:23 +0x2e
  main.main()
      _testmain.go:1119 +0x324
==================
--- FAIL: TestOnlyWriteTimeout (0.00s)
    --- FAIL: TestOnlyWriteTimeout/h1 (0.02s)
        testing.go:1446: race detected during execution of test

2023-07-06 19:41 linux-amd64-race go@312920c0 net/http.TestTLSServerRejectHTTPRequests ( log )

--- FAIL: TestTLSServerRejectHTTPRequests (0.00s)
    --- FAIL: TestTLSServerRejectHTTPRequests/h2 (0.03s)
        testing.go:1446: race detected during execution of test

2023-07-06 19:41 linux-amd64-race go@312920c0 net/http.TestIdentityResponse ( log )

--- FAIL: TestIdentityResponse (0.00s)

watchflakes

相关问题