Skip to content

Commit

Permalink
*: fix unstable test for lfu and index merge (#45648)
Browse files Browse the repository at this point in the history
close #45649
  • Loading branch information
hawkingrei authored Jul 28, 2023
1 parent 30599d8 commit 9169876
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion executor/test/indexmergereadtest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "indexmergereadtest_test",
timeout = "short",
timeout = "moderate",
srcs = [
"index_merge_reader_test.go",
"main_test.go",
Expand Down
3 changes: 3 additions & 0 deletions statistics/handle/cache/internal/lfu/lfu_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,15 @@ func TestLFUFreshMemUsage(t *testing.T) {
lfu.Put(int64(1), t1)
lfu.Put(int64(2), t2)
lfu.Put(int64(3), t3)
lfu.wait()
require.Equal(t, lfu.Cost(), 6*mockCMSMemoryUsage+6*mockCMSMemoryUsage)
t4 := testutil.NewMockStatisticsTable(2, 1, true, false, false)
lfu.Put(int64(1), t4)
lfu.wait()
require.Equal(t, lfu.Cost(), 6*mockCMSMemoryUsage+7*mockCMSMemoryUsage)
t5 := testutil.NewMockStatisticsTable(2, 2, true, false, false)
lfu.Put(int64(1), t5)
lfu.wait()
require.Equal(t, lfu.Cost(), 7*mockCMSMemoryUsage+7*mockCMSMemoryUsage)

t6 := testutil.NewMockStatisticsTable(1, 2, true, false, false)
Expand Down

0 comments on commit 9169876

Please sign in to comment.