Просмотр исходного кода

Further increase timeout duration for test to reduce false negatives

- Change text to refer to tunnel "establishment", which potentially
  involves many tunnel connection attempts.
Rod Hynes 6 лет назад
Родитель
Сommit
f145253fa8
2 измененных файлов с 5 добавлено и 5 удалено
  1. 4 4
      ClientLibrary/clientlib/clientlib.go
  2. 1 1
      ClientLibrary/clientlib/clientlib_test.go

+ 4 - 4
ClientLibrary/clientlib/clientlib.go

@@ -94,14 +94,14 @@ type NoticeEvent struct {
 	Timestamp string                 `json:"timestamp"`
 }
 
-// ErrTimeout is returned when the tunnel connection attempt fails due to timeout
-var ErrTimeout = std_errors.New("clientlib: tunnel connection timeout")
+// ErrTimeout is returned when the tunnel establishment attempt fails due to timeout
+var ErrTimeout = std_errors.New("clientlib: tunnel establishment timeout")
 
-// StartTunnel makes a Psiphon tunnel connection. It returns an error if the connection
+// StartTunnel establishes a Psiphon tunnel. It returns an error if the establishment
 // was not successful. If the returned error is nil, the returned tunnel can be used
 // to find out the proxy ports and subsequently stop the tunnel.
 //
-// ctx may be cancelable, if the caller wants to be able to interrupt the connection
+// ctx may be cancelable, if the caller wants to be able to interrupt the establishment
 // attempt, or context.Background().
 //
 // configJSON will be passed to psiphon.LoadConfig to configure the tunnel. Required.

+ 1 - 1
ClientLibrary/clientlib/clientlib_test.go

@@ -61,7 +61,7 @@ func TestStartTunnel(t *testing.T) {
 	configJSON := getConfigJSON(t)
 	clientPlatform := "clientlib_test.go"
 	networkID := "UNKNOWN"
-	timeout := 20
+	timeout := 60
 
 	// Cancels the context after a duration. Pass 0 for no cancel.
 	// (Note that cancelling causes an error, not a timeout.)