test(proxymux): reduce wait in the tests

This commit is contained in:
Haruue
2024-04-12 14:55:17 +08:00
parent 044620a5db
commit 8e886b6e05
2 changed files with 66 additions and 29 deletions

View File

@@ -31,9 +31,6 @@ func TestListenSOCKS(t *testing.T) {
}
sl.Close()
// Wait for muxListener.socksListener released
time.Sleep(time.Second)
sl, err = ListenSOCKS(address)
if !assert.NoError(t, err) {
return
@@ -63,9 +60,6 @@ func TestListenHTTP(t *testing.T) {
}
hl.Close()
// Wait for muxListener.socksListener released
time.Sleep(time.Second)
hl, err = ListenHTTP(address)
if !assert.NoError(t, err) {
return