Browse Source

Merge pull request #2027 from yichengq/273

integration: extend timeout to wait
Yicheng Qin 11 years ago
parent
commit
66d9f28926
1 changed files with 4 additions and 1 deletions
  1. 4 1
      integration/v2_http_kv_test.go

+ 4 - 1
integration/v2_http_kv_test.go

@@ -883,7 +883,10 @@ func TestV2WatchKeyInDir(t *testing.T) {
 
 
 	select {
 	select {
 	case <-c:
 	case <-c:
-	case <-time.After(time.Millisecond * 1500):
+	// 1s ttl + 0.5s sync delay + 1.5s disk and network delay
+	// We set that long disk and network delay because travis may be slow
+	// when do system calls.
+	case <-time.After(3 * time.Second):
 		t.Fatal("timed out waiting for watch result")
 		t.Fatal("timed out waiting for watch result")
 	}
 	}