From 995fcef820f43758b94a2eeef8cdd91fa08deaea Mon Sep 17 00:00:00 2001 From: JmPotato Date: Thu, 7 Dec 2023 09:37:19 +0800 Subject: [PATCH] client/http: fix TestMergeRegionsInfo to make it stable (#7502) ref tikv/pd#7300 Fix `TestMergeRegionsInfo` to make it stable. Signed-off-by: JmPotato Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com> --- client/http/types_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/http/types_test.go b/client/http/types_test.go index 74482e29c3c..1dedbdc7d3b 100644 --- a/client/http/types_test.go +++ b/client/http/types_test.go @@ -46,7 +46,7 @@ func TestMergeRegionsInfo(t *testing.T) { regionsInfo := regionsInfo1.Merge(regionsInfo2) re.Equal(int64(2), regionsInfo.Count) re.Equal(2, len(regionsInfo.Regions)) - re.Equal(append(regionsInfo1.Regions, regionsInfo2.Regions...), regionsInfo.Regions) + re.Subset(regionsInfo.Regions, append(regionsInfo1.Regions, regionsInfo2.Regions...)) } func TestRuleStartEndKey(t *testing.T) {