Merge pull request #103177 from arkbriar/support_cancelable_exec_stream

Support cancelable SPDY executor stream
This commit is contained in:
Kubernetes Prow Robot
2022-11-02 19:47:36 -07:00
committed by GitHub
7 changed files with 180 additions and 35 deletions

View File

@@ -18,6 +18,7 @@ package tests
import (
"bytes"
"context"
"errors"
"fmt"
"io"
@@ -252,7 +253,7 @@ func TestStream(t *testing.T) {
if err != nil {
t.Fatalf("%s: unexpected error: %v", name, err)
}
err = e.Stream(remoteclient.StreamOptions{
err = e.StreamWithContext(context.Background(), remoteclient.StreamOptions{
Stdin: streamIn,
Stdout: streamOut,
Stderr: streamErr,

View File

@@ -17,6 +17,7 @@ limitations under the License.
package streaming
import (
"context"
"crypto/tls"
"io"
"net/http"
@@ -355,7 +356,7 @@ func runRemoteCommandTest(t *testing.T, commandType string) {
Stderr: stderrW,
Tty: false,
}
require.NoError(t, exec.Stream(opts))
require.NoError(t, exec.StreamWithContext(context.Background(), opts))
}()
go func() {