Add mutex-using test condition to TestOnEvicted
This commit is contained in:
parent
3f2c810ea1
commit
e9441b12e0
|
@ -1235,11 +1235,16 @@ func TestOnEvicted(t *testing.T) {
|
||||||
if k == "foo" && v.(int) == 3 {
|
if k == "foo" && v.(int) == 3 {
|
||||||
works = true
|
works = true
|
||||||
}
|
}
|
||||||
|
tc.Set("bar", 4, DefaultExpiration)
|
||||||
})
|
})
|
||||||
tc.Delete("foo")
|
tc.Delete("foo")
|
||||||
|
x, _ := tc.Get("bar")
|
||||||
if !works {
|
if !works {
|
||||||
t.Error("works bool not true")
|
t.Error("works bool not true")
|
||||||
}
|
}
|
||||||
|
if x.(int) != 4 {
|
||||||
|
t.Error("bar was not 4")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestCacheSerialization(t *testing.T) {
|
func TestCacheSerialization(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue