func TestSelector(t *testing.T) {
	srvs := []string{"127.0.0.1:9876", "127.0.0.1:9879", "12.24.123.243:10911", "12.24.123.243:10915"}
	namesrv, err := NewNamesrv(primitive.NewPassthroughResolver(srvs))
	assert.Nil(t, err)
	assert.Equal(t, srvs[0], namesrv.getNameServerAddress())
	assert.Equal(t, srvs[1], namesrv.getNameServerAddress())
	assert.Equal(t, srvs[2], namesrv.getNameServerAddress())
	assert.Equal(t, srvs[3], namesrv.getNameServerAddress())
	assert.Equal(t, srvs[0], namesrv.getNameServerAddress())
	assert.Equal(t, srvs[1], namesrv.getNameServerAddress())
	assert.Equal(t, srvs[2], namesrv.getNameServerAddress())
	assert.Equal(t, srvs[3], namesrv.getNameServerAddress())
	assert.Equal(t, srvs[0], namesrv.getNameServerAddress())
}
TestSelector test roundrobin selector in namesrv
package internal
import (
	"fmt"
	"net"
	"net/http"
	"os"
	"strings"
	"sync"
	"testing"
	"github.com/apache/rocketmq-client-go/v2/primitive"
	. "github.com/smartystreets/goconvey/convey"
	"github.com/stretchr/testify/assert"
)