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:
parent
715ac9d267
commit
7bc4667214
@ -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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user