github.com/xtls/xray-core@v1.8.12-0.20240518155711-3168d27b0bdb/app/reverse/portal_test.go (about)

     1  package reverse_test
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/xtls/xray-core/app/reverse"
     7  	"github.com/xtls/xray-core/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  }