open-telemetry / opamp-go

OpAMP protocol implementation in Go
Apache License 2.0
146 stars 71 forks source link

TestSendCustomMessagePendingError is unstable #278

Closed tigrannajaryan closed 2 months ago

tigrannajaryan commented 5 months ago

Failure here https://github.com/open-telemetry/opamp-go/actions/runs/9258254769/job/25468019529

go test -race ./...
2024/05/2[7](https://github.com/open-telemetry/opamp-go/actions/runs/9258254769/job/25468019529#step:7:8) 17:09:24 http: TLS handshake error from 127.0.0.1:57048: EOF
2024/05/27 17:09:24 http: TLS handshake error from 127.0.0.1:53654: EOF
--- FAIL: TestSendCustomMessagePendingError (5.06s)
    --- FAIL: TestSendCustomMessagePendingError/http (5.02s)
        clientimpl_test.go:1926: 
                Error Trace:    /home/runner/work/opamp-go/opamp-go/client/clientimpl_test.go:1926
                                            /home/runner/work/opamp-go/opamp-go/client/clientimpl_test.go:76
                Error:          Target error should be in err chain:
                                expected: "custom message already set"
                                in chain: 
                Test:           TestSendCustomMessagePendingError/http
        clientimpl_test.go:93: 
                Error Trace:    /home/runner/work/opamp-go/opamp-go/client/clientimpl_test.go:93
                                            /home/runner/work/opamp-go/opamp-go/client/clientimpl_test.go:1930
                                            /home/runner/work/opamp-go/opamp-go/client/clientimpl_test.go:76
                Error:          Condition never satisfied
                Test:           TestSendCustomMessagePendingError/http
sent 40560, received 40205
2024/05/27 17:09:40 websocket: discarding reader close error: io: read/write on closed pipe
2024/05/27 17:09:40 websocket: discarding reader close error: io: read/write on closed pipe
2024/05/27 17:09:40 websocket: discarding reader close error: io: read/write on closed pipe
2024/05/27 17:09:40 websocket: discarding reader close error: io: read/write on closed pipe
sent [8](https://github.com/open-telemetry/opamp-go/actions/runs/9258254769/job/25468019529#step:7:9)02, received 547
FAIL
FAIL    github.com/open-telemetry/opamp-go/client   17.[9](https://github.com/open-telemetry/opamp-go/actions/runs/9258254769/job/25468019529#step:7:10)42s

@andykellr you wrote the test. Can you please take a look?