From c4179829d68394c184ed4a1578960f74faefb701 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Fri, 20 Dec 2013 08:23:50 +0800 Subject: [PATCH] tests(get_handler) loosen the time assumption for the un --- server/v2/tests/get_handler_test.go | 2 +- tests/functional/simple_snapshot_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/v2/tests/get_handler_test.go b/server/v2/tests/get_handler_test.go index a8dd0e1d3..b9f4979db 100644 --- a/server/v2/tests/get_handler_test.go +++ b/server/v2/tests/get_handler_test.go @@ -205,7 +205,7 @@ func TestV2WatchKeyInDir(t *testing.T) { }() // wait for expiration, we do have a up to 500 millisecond delay - time.Sleep(1500 * time.Millisecond) + time.Sleep(2000 * time.Millisecond) select { case <-c: diff --git a/tests/functional/simple_snapshot_test.go b/tests/functional/simple_snapshot_test.go index 29872d648..b47be3e65 100644 --- a/tests/functional/simple_snapshot_test.go +++ b/tests/functional/simple_snapshot_test.go @@ -56,7 +56,7 @@ func TestSimpleSnapshot(t *testing.T) { index, _ := strconv.Atoi(snapshots[0].Name()[2:5]) - if index <= 507 || index >= 510 { + if index < 507 || index > 510 { t.Fatal("wrong name of snapshot :", snapshots[0].Name()) } @@ -89,7 +89,7 @@ func TestSimpleSnapshot(t *testing.T) { index, _ = strconv.Atoi(snapshots[0].Name()[2:6]) - if index <= 1014 || index >= 1017 { + if index < 1014 || index > 1017 { t.Fatal("wrong name of snapshot :", snapshots[0].Name()) } }