open-telemetry / opamp-go

OpAMP protocol implementation in Go
Apache License 2.0
140 stars 69 forks source link

TestConnectionAllowsConcurrentWrites is unstable #280

Closed tigrannajaryan closed 3 months ago

tigrannajaryan commented 3 months ago

Failed randomly during this run (after passing successfully several times on the same code): https://github.com/open-telemetry/opamp-go/actions/runs/9320852174/job/25658565278

?       github.com/open-telemetry/opamp-go/internal/testhelpers [no test files]
sent 40306, received 40180
2024/05/31 15:51:01 websocket: discarding reader close error: io: read/write on closed pipe
sent 556, received 501
--- FAIL: TestConnectionAllowsConcurrentWrites (0.00s)
panic: interface conversion: interface is nil, not types.Connection [recovered]
    panic: interface conversion: interface is nil, not types.Connection

goroutine 142 [running]:
testing.tRunner.func1.2({0x91d8c0, 0xc00007e0c0})
    /opt/hostedtoolcache/go/1.20.14/x64/src/testing/testing.go:1526 +0x24e
testing.tRunner.func1()
    /opt/hostedtoolcache/go/1.20.14/x64/src/testing/testing.go:1529 +0x39f
panic({0x91d8c0, 0xc00007e0c0})
    /opt/hostedtoolcache/go/1.20.14/x64/src/runtime/panic.go:884 +0x2[13](https://github.com/open-telemetry/opamp-go/actions/runs/9320852174/job/25658565278#step:8:14)
github.com/open-telemetry/opamp-go/server.TestConnectionAllowsConcurrentWrites(0xc000333860)
    /home/runner/work/opamp-go/opamp-go/server/serverimpl_test.go:848 +0x316
testing.tRunner(0xc000333860, 0x9e0dc0)
    /opt/hostedtoolcache/go/1.20.[14](https://github.com/open-telemetry/opamp-go/actions/runs/9320852174/job/25658565278#step:8:15)/x64/src/testing/testing.go:[15](https://github.com/open-telemetry/opamp-go/actions/runs/9320852174/job/25658565278#step:8:16)76 +0x10b
created by testing.(*T).Run
    /opt/hostedtoolcache/go/1.20.14/x64/src/testing/testing.go:[16](https://github.com/open-telemetry/opamp-go/actions/runs/9320852174/job/25658565278#step:8:17)29 +0x3ea
FAIL    github.com/open-telemetry/opamp-go/server   0.190s
FAIL
exit status 1make: *** [makefile:22: test-with-cover] Error 1