mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 23:47:07 -05:00
Test: fix leastload strategy unit test
This commit is contained in:
parent
f9422d60aa
commit
294efeefd7
@ -118,7 +118,7 @@ func TestSelectLeastExpectedAndBaselines(t *testing.T) {
|
||||
{Tag: "d", RTTDeviationCost: 300},
|
||||
{Tag: "e", RTTDeviationCost: 310},
|
||||
}
|
||||
expected := 4
|
||||
expected := 3
|
||||
ns := strategy.selectLeastLoad(nodes)
|
||||
if len(ns) != expected {
|
||||
t.Errorf("expected: %v, actual: %v", expected, len(ns))
|
||||
@ -158,7 +158,7 @@ func TestSelectLeastLoadBaselines(t *testing.T) {
|
||||
{Tag: "b", RTTDeviationCost: 200},
|
||||
{Tag: "c", RTTDeviationCost: 300},
|
||||
}
|
||||
expected := 2
|
||||
expected := 1
|
||||
ns := strategy.selectLeastLoad(nodes)
|
||||
if len(ns) != expected {
|
||||
t.Errorf("expected: %v, actual: %v", expected, len(ns))
|
||||
|
Loading…
Reference in New Issue
Block a user