github.com/v2fly/v2ray-core/v5@v5.16.2-0.20240507031116-8191faa6e095/app/reverse/portal_test.go (about)

     1  package reverse_test
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/v2fly/v2ray-core/v5/app/reverse"
     7  	"github.com/v2fly/v2ray-core/v5/common"
     8  )
     9  
    10  func TestStaticPickerEmpty(t *testing.T) {
    11  	picker, err := reverse.NewStaticMuxPicker()
    12  	common.Must(err)
    13  	worker, err := picker.PickAvailable()
    14  	if err == nil {
    15  		t.Error("expected error, but nil")
    16  	}
    17  	if worker != nil {
    18  		t.Error("expected nil worker, but not nil")
    19  	}
    20  }