backlog must always have higher priority

This commit is contained in:
Anton Kaliaev
2017-08-08 19:02:47 -04:00
parent 797acbe911
commit 236489aecf
2 changed files with 26 additions and 13 deletions

View File

@ -138,7 +138,10 @@ func TestWSClientReconnectFailure(t *testing.T) {
s.Close()
// results in WS write error
call(t, "a", c)
// provide timeout to avoid blocking
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()
c.Call(ctx, "a", make(map[string]interface{}))
// expect to reconnect almost immediately
time.Sleep(10 * time.Millisecond)