瀏覽代碼

Raise the timeouts for the TCP/UDP localhost proxy tests

Sometimes these tests fail, let's see if that improves the situation.
Louis Opter 12 年之前
父節點
當前提交
8f36467107
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      runtime_test.go

+ 2 - 2
runtime_test.go

@@ -396,7 +396,7 @@ func TestAllocateTCPPortLocalhost(t *testing.T) {
 	}
 	}
 	buf := make([]byte, 16)
 	buf := make([]byte, 16)
 	read := 0
 	read := 0
-	conn.SetReadDeadline(time.Now().Add(2 * time.Second))
+	conn.SetReadDeadline(time.Now().Add(4 * time.Second))
 	read, err = conn.Read(buf)
 	read, err = conn.Read(buf)
 	if err != nil {
 	if err != nil {
 		t.Fatal(err)
 		t.Fatal(err)
@@ -421,7 +421,7 @@ func TestAllocateUDPPortLocalhost(t *testing.T) {
 
 
 	input := bytes.NewBufferString("well hello there\n")
 	input := bytes.NewBufferString("well hello there\n")
 	buf := make([]byte, 16)
 	buf := make([]byte, 16)
-	for i := 0; i != 10; i++ {
+	for i := 0; i != 20; i++ {
 		_, err := conn.Write(input.Bytes())
 		_, err := conn.Write(input.Bytes())
 		if err != nil {
 		if err != nil {
 			t.Fatal(err)
 			t.Fatal(err)