Skip to content

Commit 0d19d7f

Browse files
committed
test case improvement
1 parent 673a0fd commit 0d19d7f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cache/cache_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ func testAdd(t *testing.T, newCache cacheFactory) {
190190
}
191191

192192
// Wait for it to expire, and add again.
193-
time.Sleep(6 * time.Second)
194-
if err = cache.Add("int", 3, time.Second*3); err != nil {
193+
time.Sleep(8 * time.Second)
194+
if err = cache.Add("int", 3, time.Second*5); err != nil {
195195
t.Errorf("Unexpected error adding to cache: %s", err)
196196
}
197197

@@ -217,7 +217,7 @@ func testGetMulti(t *testing.T, newCache cacheFactory) {
217217
var keys []string
218218
for key, value := range m {
219219
keys = append(keys, key)
220-
if err := cache.Set(key, value, time.Second*3); err != nil {
220+
if err := cache.Set(key, value, time.Second*10); err != nil {
221221
t.Errorf("Error setting a value: %s", err)
222222
}
223223
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy