1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-29 23:36:25 -04:00
v2fly/common/mux/client_test.go

22 lines
372 B
Go
Raw Normal View History

2018-10-24 16:37:11 -04:00
package mux_test
import (
"testing"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/mux"
)
func TestIncrementalPickerFailure(t *testing.T) {
picker := mux.IncrementalWorkerPicker{
New: func() (*mux.ClientWorker, error) {
return nil, errors.New("test")
},
}
_, err := picker.PickAvailable()
if err == nil {
t.Error("expected error, but nil")
}
}