simplify lock
This commit is contained in:
@ -244,7 +244,7 @@ func TestExpire(t *testing.T) {
|
||||
|
||||
s.Create("/foo", "bar", expire, 1, 1)
|
||||
|
||||
_, err := s.internalGet("/foo", 1, 1)
|
||||
_, err := s.Get("/foo", false, false, 1, 1)
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("can not get the node")
|
||||
@ -252,7 +252,7 @@ func TestExpire(t *testing.T) {
|
||||
|
||||
time.Sleep(time.Second * 2)
|
||||
|
||||
_, err = s.internalGet("/foo", 1, 1)
|
||||
_, err = s.Get("/foo", false, false, 1, 1)
|
||||
|
||||
if err == nil {
|
||||
t.Fatalf("can get the node after expiration time")
|
||||
@ -263,7 +263,7 @@ func TestExpire(t *testing.T) {
|
||||
s.Create("/foo", "bar", expire, 1, 1)
|
||||
|
||||
time.Sleep(time.Millisecond * 50)
|
||||
_, err = s.internalGet("/foo", 1, 1)
|
||||
_, err = s.Get("/foo", false, false, 1, 1)
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("cannot get the node before expiration", err.Error())
|
||||
|
Reference in New Issue
Block a user