File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,9 @@ func TestRunWithContextNoTimeout(t *testing.T) {
1515 maxLoops := 10
1616
1717 // 'git --version' does not block so it must be finished before the timeout triggered.
18- cmd := NewCommand (t . Context (), "--version" )
18+ cmd := NewCommand ("--version" )
1919 for i := 0 ; i < maxLoops ; i ++ {
20- if err := cmd .Run (& RunOpts {}); err != nil {
20+ if err := cmd .Run (t . Context (), & RunOpts {}); err != nil {
2121 t .Fatal (err )
2222 }
2323 }
@@ -27,9 +27,9 @@ func TestRunWithContextTimeout(t *testing.T) {
2727 maxLoops := 10
2828
2929 // 'git hash-object --stdin' blocks on stdin so we can have the timeout triggered.
30- cmd := NewCommand (t . Context (), "hash-object" , "--stdin" )
30+ cmd := NewCommand ("hash-object" , "--stdin" )
3131 for i := 0 ; i < maxLoops ; i ++ {
32- if err := cmd .Run (& RunOpts {Timeout : 1 * time .Millisecond }); err != nil {
32+ if err := cmd .Run (t . Context (), & RunOpts {Timeout : 1 * time .Millisecond }); err != nil {
3333 if err != context .DeadlineExceeded {
3434 t .Fatalf ("Testing %d/%d: %v" , i , maxLoops , err )
3535 }
You can’t perform that action at this time.
0 commit comments