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

WS, HU: Remove unnecessary sleep from test (#3600)

mmmray преди 1 година
родител
ревизия
7cf5ee8afd
променени са 2 файла, в които са добавени 0 реда и са изтрити 3 реда
  1. 0 2
      transport/internet/httpupgrade/httpupgrade_test.go
  2. 0 1
      transport/internet/websocket/ws_test.go

+ 0 - 2
transport/internet/httpupgrade/httpupgrade_test.go

@@ -58,7 +58,6 @@ func Test_listenHTTPUpgradeAndDial(t *testing.T) {
 	}
 
 	common.Must(conn.Close())
-	<-time.After(time.Second * 5)
 	conn, err = Dial(ctx, net.TCPDestination(net.DomainAddress("localhost"), listenPort), streamSettings)
 	common.Must(err)
 	_, err = conn.Write([]byte("Test connection 2"))
@@ -118,7 +117,6 @@ func Test_listenHTTPUpgradeAndDialWithHeaders(t *testing.T) {
 	}
 
 	common.Must(conn.Close())
-	<-time.After(time.Second * 5)
 	conn, err = Dial(ctx, net.TCPDestination(net.DomainAddress("localhost"), listenPort), streamSettings)
 	common.Must(err)
 	_, err = conn.Write([]byte("Test connection 2"))

+ 0 - 1
transport/internet/websocket/ws_test.go

@@ -58,7 +58,6 @@ func Test_listenWSAndDial(t *testing.T) {
 	}
 
 	common.Must(conn.Close())
-	<-time.After(time.Second * 5)
 	conn, err = Dial(ctx, net.TCPDestination(net.DomainAddress("localhost"), listenPort), streamSettings)
 	common.Must(err)
 	_, err = conn.Write([]byte("Test connection 2"))