فهرست منبع

tests(get_handler) loosen the time assumption for the un

Xiang Li 12 سال پیش
والد
کامیت
c4179829d6
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 1 1
      server/v2/tests/get_handler_test.go
  2. 2 2
      tests/functional/simple_snapshot_test.go

+ 1 - 1
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:

+ 2 - 2
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())
 	}
 }