Procházet zdrojové kódy

Clean up test networking shutdown

Rod Hynes před 4 roky
rodič
revize
b7fcccb678
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 3 0
      psiphon/common/tun/tun_test.go

+ 3 - 0
psiphon/common/tun/tun_test.go

@@ -204,6 +204,9 @@ func testTunneledTCP(t *testing.T, useIPv6 bool) {
 
 
 			testTCPClient.stop()
 			testTCPClient.stop()
 
 
+			// Allow some time for the TCP FIN to be tunneled, for a clean shutdown.
+			time.Sleep(100 * time.Millisecond)
+
 			testClient.stop()
 			testClient.stop()
 
 
 			// Check metrics to ensure traffic was tunneled and metrics reported
 			// Check metrics to ensure traffic was tunneled and metrics reported