1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 01:57:12 -05:00

test case

This commit is contained in:
Darien Raymond 2018-10-24 22:37:11 +02:00
parent 284923664a
commit a69217b584
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

21
common/mux/client_test.go Normal file
View File

@ -0,0 +1,21 @@
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")
}
}