Преглед на файлове

pkg/transport: change write size from 1MB -> 5MB

As we move to container-based infrastructure testing env
on travis, the tcp write buffer is more than 1MB. Change
the test according to the change on the testing env.
Xiang Li преди 11 години
родител
ревизия
3cc4cdd363
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      pkg/transport/timeout_dialer_test.go
  2. 1 1
      pkg/transport/timeout_listener_test.go

+ 1 - 1
pkg/transport/timeout_dialer_test.go

@@ -43,7 +43,7 @@ func TestReadWriteTimeoutDialer(t *testing.T) {
 	defer conn.Close()
 	defer conn.Close()
 
 
 	// fill the socket buffer
 	// fill the socket buffer
-	data := make([]byte, 1024*1024)
+	data := make([]byte, 5*1024*1024)
 	timer := time.AfterFunc(d.wtimeoutd*5, func() {
 	timer := time.AfterFunc(d.wtimeoutd*5, func() {
 		t.Fatal("wait timeout")
 		t.Fatal("wait timeout")
 	})
 	})

+ 1 - 1
pkg/transport/timeout_listener_test.go

@@ -52,7 +52,7 @@ func TestWriteReadTimeoutListener(t *testing.T) {
 	defer conn.Close()
 	defer conn.Close()
 
 
 	// fill the socket buffer
 	// fill the socket buffer
-	data := make([]byte, 1024*1024)
+	data := make([]byte, 5*1024*1024)
 	timer := time.AfterFunc(wln.wtimeoutd*5, func() {
 	timer := time.AfterFunc(wln.wtimeoutd*5, func() {
 		t.Fatal("wait timeout")
 		t.Fatal("wait timeout")
 	})
 	})