mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 15:36:41 -05:00
more complicated mux test
This commit is contained in:
parent
bf0a4c428e
commit
a49816ae46
@ -876,9 +876,11 @@ func TestVMessGCMMux(t *testing.T) {
|
|||||||
assert.Error(InitializeServerConfig(serverConfig)).IsNil()
|
assert.Error(InitializeServerConfig(serverConfig)).IsNil()
|
||||||
assert.Error(InitializeServerConfig(clientConfig)).IsNil()
|
assert.Error(InitializeServerConfig(clientConfig)).IsNil()
|
||||||
|
|
||||||
|
for range "abcd" {
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
wg.Add(100)
|
const nConnection = 100
|
||||||
for i := 0; i < 100; i++ {
|
wg.Add(nConnection)
|
||||||
|
for i := 0; i < nConnection; i++ {
|
||||||
go func() {
|
go func() {
|
||||||
conn, err := net.DialTCP("tcp", nil, &net.TCPAddr{
|
conn, err := net.DialTCP("tcp", nil, &net.TCPAddr{
|
||||||
IP: []byte{127, 0, 0, 1},
|
IP: []byte{127, 0, 0, 1},
|
||||||
@ -900,6 +902,7 @@ func TestVMessGCMMux(t *testing.T) {
|
|||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
}
|
||||||
|
|
||||||
CloseAllServers()
|
CloseAllServers()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user