From 8de650684f8fb814cf4ff9558fcbbf3d8c3d031f Mon Sep 17 00:00:00 2001 From: Davies Liu Date: Fri, 29 Jan 2021 21:48:30 +0800 Subject: [PATCH] fix flaky test --- pkg/meta/redis_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/meta/redis_test.go b/pkg/meta/redis_test.go index 788f3b5a0a0d..536ee8a43660 100644 --- a/pkg/meta/redis_test.go +++ b/pkg/meta/redis_test.go @@ -433,9 +433,9 @@ func TestTruncateAndDelete(t *testing.T) { time.Sleep(time.Millisecond * 100) keys = listAll(fmt.Sprintf("c%d_*", inode)) - // the last chunk will be found and deleted - if len(keys) != 1 { - t.Fatalf("number of chunks: %d != 1, %+v", len(keys), keys) + // the last chunk could be found and deleted + if len(keys) > 1 { + t.Fatalf("number of chunks: %d > 1, %+v", len(keys), keys) } }