mirror of
https://github.com/umputun/reproxy.git
synced 2024-11-23 00:36:55 +03:00
drop legacy rand.Seed
This commit is contained in:
parent
96904fe7c5
commit
197246a05a
@ -416,7 +416,6 @@ func makeSSLConfig() (config proxy.SSLConfig, err error) {
|
||||
func makeLBSelector() func(len int) int {
|
||||
switch opts.LBType {
|
||||
case "random":
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
return rand.Intn
|
||||
case "failover":
|
||||
return func(int) int { return 0 } // dead server won't be in the list, we can safely pick the first one
|
||||
|
@ -156,7 +156,6 @@ func Test_MainWithSSL(t *testing.T) {
|
||||
}
|
||||
|
||||
func Test_MainWithPlugin(t *testing.T) {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
proxyPort := rand.Intn(10000) + 40000
|
||||
conductorPort := rand.Intn(10000) + 40000
|
||||
os.Args = []string{"test", "--static.enabled",
|
||||
|
@ -318,7 +318,6 @@ func TestConductor_MiddlewarePluginBadStatus(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
port := rand.Intn(30000)
|
||||
c := Conductor{RPCDialer: dialer, Address: "127.0.0.1:" + strconv.Itoa(30000+port)}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user