File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ func TestCommandContext(t *testing.T) {
168168
169169 for _ , tc := range tests {
170170 t .Run (tc .doc , func (t * testing.T ) {
171- ctx , cancel := context .WithTimeout (context . Background (), 100 * time .Millisecond )
171+ ctx , cancel := context .WithTimeout (t . Context (), 100 * time .Millisecond )
172172 defer cancel ()
173173
174174 cmd := reexec .CommandContext (ctx , tc .cmdAndArgs ... )
@@ -208,7 +208,7 @@ func TestCommandContext(t *testing.T) {
208208// [reexecoverride.OverrideArgv0] so that the fallback logic is exercised
209209// consistently across platforms.
210210func TestRunNaiveSelf (t * testing.T ) {
211- ctx , cancel := context .WithTimeout (context . Background (), 100 * time .Millisecond )
211+ ctx , cancel := context .WithTimeout (t . Context (), 100 * time .Millisecond )
212212 defer cancel ()
213213
214214 // Force Self() to use naiveSelf(os.Args[0]), instead of "/proc/self/exe" on Linux.
You can’t perform that action at this time.
0 commit comments