Pārlūkot izejas kodu

update TestRunDisconnectTty to reflect the correct behavior of CmdRun

Guillaume J. Charmes 12 gadi atpakaļ
vecāks
revīzija
cc5a044a8c
1 mainītis faili ar 2 papildinājumiem un 5 dzēšanām
  1. 2 5
      commands_test.go

+ 2 - 5
commands_test.go

@@ -239,11 +239,8 @@ func TestRunDisconnectTty(t *testing.T) {
 		t.Fatal(err)
 	}
 
-	// as the pipes are close, we expect the process to die,
-	// therefore CmdRun to unblock. Wait for CmdRun
-	setTimeout(t, "Waiting for CmdRun timed out", 2*time.Second, func() {
-		<-c1
-	})
+	// In tty mode, we expect the process to stay alive even after client's stdin closes.
+	// Do not wait for run to finish
 
 	// Client disconnect after run -i should keep stdin out in TTY mode
 	container := runtime.List()[0]