From 8db890c510bada8dfdfd94b05690d947ed25830c Mon Sep 17 00:00:00 2001 From: John Guo Date: Sat, 20 Nov 2021 12:08:14 +0800 Subject: [PATCH] improve unit testing case for package gcache --- os/gcache/gcache_z_unit_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/gcache/gcache_z_unit_test.go b/os/gcache/gcache_z_unit_test.go index 648b2e943..1f10b4223 100644 --- a/os/gcache/gcache_z_unit_test.go +++ b/os/gcache/gcache_z_unit_test.go @@ -119,7 +119,7 @@ func TestCache_UpdateExpire(t *testing.T) { newExpire := 10 * time.Second oldExpire2, err := gcache.UpdateExpire(ctx, key, newExpire) t.AssertNil(err) - t.Assert(oldExpire2, oldExpire) + t.AssertIN(oldExpire2, g.Slice{oldExpire, `2.999s`}) e, _ := gcache.GetExpire(ctx, key) t.AssertNE(e, oldExpire)