1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-30 05:56:54 -05:00

increase concurrency

This commit is contained in:
Darien Raymond 2018-10-28 07:41:54 +01:00
parent 715ac9d267
commit 7bc4667214
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -2,6 +2,7 @@ package scenarios
import (
"crypto/rand"
"sync"
"testing"
"time"
@ -178,11 +179,11 @@ func TestReverseProxy(t *testing.T) {
defer CloseAllServers(servers)
//var wg sync.WaitGroup
//wg.Add(10)
//for i := 0; i < 10; i++ {
//go func() {
//defer wg.Done()
var wg sync.WaitGroup
wg.Add(10)
for i := 0; i < 32; i++ {
go func() {
defer wg.Done()
conn, err := net.DialTCP("tcp", nil, &net.TCPAddr{
IP: []byte{127, 0, 0, 1},
@ -205,7 +206,7 @@ func TestReverseProxy(t *testing.T) {
if err := compare.BytesEqualWithDetail(response, xor([]byte(payload))); err != nil {
t.Error(err)
}
//}()
//}
//wg.Wait()
}()
}
wg.Wait()
}