From 294efeefd7545fc1e0d206a499f7ae6cd0550130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E3=81=AE=E3=81=8B=E3=81=88=E3=81=A7?= Date: Thu, 3 Nov 2022 20:30:28 +0800 Subject: [PATCH] Test: fix leastload strategy unit test --- app/router/strategy_leastload_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/router/strategy_leastload_test.go b/app/router/strategy_leastload_test.go index 2d11301d5..5f7fab414 100644 --- a/app/router/strategy_leastload_test.go +++ b/app/router/strategy_leastload_test.go @@ -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))