Browse Source

Merge pull request #310 from xiangli-cmu/master

test fix wrong assumption should be previous index + 501 + 6
Xiang Li 12 years ago
parent
commit
48f5a47ff1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tests/functional/simple_snapshot_test.go

+ 2 - 2
tests/functional/simple_snapshot_test.go

@@ -55,7 +55,7 @@ func TestSimpleSnapshot(t *testing.T) {
 
 
 	index, _ := strconv.Atoi(snapshots[0].Name()[2:5])
 	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())
 		t.Fatal("wrong name of snapshot :", snapshots[0].Name())
 	}
 	}
 
 
@@ -87,7 +87,7 @@ func TestSimpleSnapshot(t *testing.T) {
 
 
 	index, _ = strconv.Atoi(snapshots[0].Name()[2:6])
 	index, _ = strconv.Atoi(snapshots[0].Name()[2:6])
 
 
-	if index < 1015 || index > 1018 {
+	if index <= 1014 || index >= 1017 {
 		t.Fatal("wrong name of snapshot :", snapshots[0].Name())
 		t.Fatal("wrong name of snapshot :", snapshots[0].Name())
 	}
 	}
 }
 }