From 6c8dcb64e3edd4e80032a466e830080527bb1b6a Mon Sep 17 00:00:00 2001 From: Suhaha Date: Thu, 19 May 2022 09:22:38 +0800 Subject: [PATCH] chore: update test & comment --- pkg/keyvisual/decorator/tidb.go | 2 +- pkg/keyvisual/decorator/tidb_test.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/keyvisual/decorator/tidb.go b/pkg/keyvisual/decorator/tidb.go index 17ff0ce88b..ba4b15852a 100644 --- a/pkg/keyvisual/decorator/tidb.go +++ b/pkg/keyvisual/decorator/tidb.go @@ -64,7 +64,7 @@ type TableInOrder struct { tables []*tableDetail } -// BuildFromTableMap build order map from a table map. +// BuildFromTableMap build order tables from a table map. func (inOrder *TableInOrder) BuildFromTableMap(m *sync.Map) { tables := []*tableDetail{} m.Range(func(key, value interface{}) bool { diff --git a/pkg/keyvisual/decorator/tidb_test.go b/pkg/keyvisual/decorator/tidb_test.go index 2b9f32a7c5..c4ffa31d61 100644 --- a/pkg/keyvisual/decorator/tidb_test.go +++ b/pkg/keyvisual/decorator/tidb_test.go @@ -46,4 +46,5 @@ func TestTableInOrderFindOne(t *testing.T) { require.Nil(t, tableInOrder.FindOne(3, 4)) require.Nil(t, tableInOrder.FindOne(8, 0)) require.Nil(t, tableInOrder.FindOne(8, 8)) + require.Nil(t, tableInOrder.FindOne(80, 81)) }