open-telemetry / opamp-go

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

Fix test TestOfferUpdatedVersion #279

Closed tigrannajaryan closed 5 months ago

tigrannajaryan commented 5 months ago

The test sometimes fails on my machine. The EventuallyExpect function needs a condition that returns false instead of failing when the expected message is not received, since a different message may be sent by the client.

This fixes the test. I run it 100 times and it passes: go test -run TestOfferUpdatedVersion/ws -v -race -count 100

(Apologies for whitespace changes, but they appear to be incorrectly formatted, my editor autoformatted it and go fmt passes on the text).

tigrannajaryan commented 5 months ago

@phanidevavarapu @srikanthccv please review.

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 75.96%. Comparing base (f299bc3) to head (c6b41e7).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #279 +/- ## ======================================= Coverage 75.96% 75.96% ======================================= Files 25 25 Lines 1656 1656 ======================================= Hits 1258 1258 Misses 291 291 Partials 107 107 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.