From 4871f863461df024dbc694d4ecf685f292fd4303 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=B3=96=E6=B0=B4=E4=B8=8D=E5=8A=A0=E7=B3=96?= <641008175@qq.com> Date: Fri, 7 Aug 2020 16:26:26 +0800 Subject: [PATCH] adjust TestCache_Expire_SetVar Test Code. --- os/gcache/gcache_z_unit_1_test.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/os/gcache/gcache_z_unit_1_test.go b/os/gcache/gcache_z_unit_1_test.go index dd4a384e3..b7472da9a 100644 --- a/os/gcache/gcache_z_unit_1_test.go +++ b/os/gcache/gcache_z_unit_1_test.go @@ -77,10 +77,7 @@ func TestCache_Expire_SetVar(t *testing.T) { gtest.C(t, func(t *gtest.T) { cache := gcache.New() cache.Set(1, 11, 3*time.Second) - expireBefore, okBefore := cache.GetExpire(1) - if okBefore { - t.AssertGT(expireBefore, 0) - } + expireBefore, _ := cache.GetExpire(1) t.Assert(cache.Get(1), 11) cache.SetVar(1, 12) t.Assert(cache.Get(1), 12)