Skip to content

Commit

Permalink
test: compatible with go version 1.17
Browse files Browse the repository at this point in the history
  • Loading branch information
huskar-t committed Nov 22, 2024
1 parent cf5e8e7 commit fc6687f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/melody/melody_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,9 @@ func TestConcurrentMessageHandling(t *testing.T) {
ws.m.Config.PingPeriod = base / 2
ws.m.Config.PongWait = base

var errorSet atomic.Bool
var errorSet uint32
ws.m.HandleError(func(s *Session, err error) {
errorSet.Store(true)
atomic.StoreUint32(&errorSet, 1)
done <- struct{}{}
})

Expand All @@ -586,7 +586,7 @@ func TestConcurrentMessageHandling(t *testing.T) {

<-done

return errorSet.Load()
return atomic.LoadUint32(&errorSet) != 0
}

t.Run("text should error", func(t *testing.T) {
Expand Down

0 comments on commit fc6687f

Please sign in to comment.