proxy: Fix race in test

This commit is contained in:
Matthew Holt 2017-02-18 15:42:11 -07:00
parent 286d8d1e89
commit 9720da5bc8
No known key found for this signature in database
GPG Key ID: 2A349DD577D586A5

View File

@ -278,8 +278,8 @@ func TestWebSocketReverseProxyServeHTTPHandler(t *testing.T) {
if !bytes.Equal(actual, expected) {
t.Errorf("Expected backend to accept response:\n'%s'\nActually got:\n'%s'", expected, actual)
}
if atomic.LoadInt32(&connCount) != 1 {
t.Errorf("Expected 1 websocket connection, got %d", connCount)
if got, want := atomic.LoadInt32(&connCount), int32(1); got != want {
t.Errorf("Expected %d websocket connection, got %d", want, got)
}
}