make ttl test not so strict. testing server is not fast

This commit is contained in:
Xiang Li 2013-08-14 15:28:41 -07:00 committed by Brandon Philips
parent e0ca8f20d2
commit 012e747f18

View File

@ -34,7 +34,7 @@ func TestSingleNode(t *testing.T) {
// Test Set
result, err := c.Set("foo", "bar", 100)
if err != nil || result.Key != "/foo" || result.Value != "bar" || result.TTL != 99 {
if err != nil || result.Key != "/foo" || result.Value != "bar" || result.TTL < 95 {
if err != nil {
t.Fatal(err)
}
@ -75,7 +75,7 @@ func TestSingleNodeRecovery(t *testing.T) {
// Test Set
result, err := c.Set("foo", "bar", 100)
if err != nil || result.Key != "/foo" || result.Value != "bar" || result.TTL != 99 {
if err != nil || result.Key != "/foo" || result.Value != "bar" || result.TTL < 95 {
if err != nil {
t.Fatal(err)
}
@ -136,7 +136,7 @@ func templateTestSimpleMultiNode(t *testing.T, tls bool) {
// Test Set
result, err := c.Set("foo", "bar", 100)
if err != nil || result.Key != "/foo" || result.Value != "bar" || result.TTL != 99 {
if err != nil || result.Key != "/foo" || result.Value != "bar" || result.TTL < 95 {
if err != nil {
t.Fatal(err)
}