Merge pull request #103177 from arkbriar/support_cancelable_exec_stream
Support cancelable SPDY executor stream
This commit is contained in:
@@ -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,
|
||||
|
@@ -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() {
|
||||
|
Reference in New Issue
Block a user