@@ -933,7 +933,7 @@ func testClientGatewayContainerPID1Tty(t *testing.T, sb integration.Sandbox) {
933933 output := bytes .NewBuffer (nil )
934934
935935 b := func (ctx context.Context , c client.Client ) (* client.Result , error ) {
936- ctx , timeout := context .WithTimeout (ctx , 10 * time .Second )
936+ ctx , timeout := context .WithTimeoutCause (ctx , 10 * time .Second , nil )
937937 defer timeout ()
938938
939939 st := llb .Image ("busybox:latest" )
@@ -1015,7 +1015,7 @@ func testClientGatewayContainerCancelPID1Tty(t *testing.T, sb integration.Sandbo
10151015 output := bytes .NewBuffer (nil )
10161016
10171017 b := func (ctx context.Context , c client.Client ) (* client.Result , error ) {
1018- ctx , cancel := context .WithTimeout (ctx , 10 * time .Second )
1018+ ctx , cancel := context .WithTimeoutCause (ctx , 10 * time .Second , nil )
10191019 defer cancel ()
10201020
10211021 st := llb .Image ("busybox:latest" )
@@ -1141,7 +1141,7 @@ func testClientGatewayContainerExecTty(t *testing.T, sb integration.Sandbox) {
11411141 inputR , inputW := io .Pipe ()
11421142 output := bytes .NewBuffer (nil )
11431143 b := func (ctx context.Context , c client.Client ) (* client.Result , error ) {
1144- ctx , timeout := context .WithTimeout (ctx , 10 * time .Second )
1144+ ctx , timeout := context .WithTimeoutCause (ctx , 10 * time .Second , nil )
11451145 defer timeout ()
11461146 st := llb .Image ("busybox:latest" )
11471147
@@ -1233,7 +1233,7 @@ func testClientGatewayContainerCancelExecTty(t *testing.T, sb integration.Sandbo
12331233 inputR , inputW := io .Pipe ()
12341234 output := bytes .NewBuffer (nil )
12351235 b := func (ctx context.Context , c client.Client ) (* client.Result , error ) {
1236- ctx , timeout := context .WithTimeout (ctx , 10 * time .Second )
1236+ ctx , timeout := context .WithTimeoutCause (ctx , 10 * time .Second , nil )
12371237 defer timeout ()
12381238 st := llb .Image ("busybox:latest" )
12391239
@@ -1266,8 +1266,8 @@ func testClientGatewayContainerCancelExecTty(t *testing.T, sb integration.Sandbo
12661266 defer pid1 .Wait ()
12671267 defer ctr .Release (ctx )
12681268
1269- execCtx , cancel := context .WithCancel (ctx )
1270- defer cancel ()
1269+ execCtx , cancel := context .WithCancelCause (ctx )
1270+ defer cancel (errors . WithStack ( context . Canceled ) )
12711271
12721272 prompt := newTestPrompt (execCtx , t , inputW , output )
12731273 pid2 , err := ctr .Start (execCtx , client.StartRequest {
@@ -1281,7 +1281,7 @@ func testClientGatewayContainerCancelExecTty(t *testing.T, sb integration.Sandbo
12811281 require .NoError (t , err )
12821282
12831283 prompt .SendExpect ("echo hi" , "hi" )
1284- cancel ()
1284+ cancel (errors . WithStack ( context . Canceled ) )
12851285
12861286 err = pid2 .Wait ()
12871287 require .ErrorIs (t , err , context .Canceled )
@@ -2132,7 +2132,7 @@ func testClientGatewayContainerSignal(t *testing.T, sb integration.Sandbox) {
21322132 product := "buildkit_test"
21332133
21342134 b := func (ctx context.Context , c client.Client ) (* client.Result , error ) {
2135- ctx , timeout := context .WithTimeout (ctx , 10 * time .Second )
2135+ ctx , timeout := context .WithTimeoutCause (ctx , 10 * time .Second , nil )
21362136 defer timeout ()
21372137
21382138 st := llb .Image ("busybox:latest" )
0 commit comments