Closed zbindenren closed 5 years ago
This is another version of #23019. git is starting a subprocess to read the password, the context timeout only kills the parent process, and the use of CombinedOutput
means that the main program hangs waiting for the subprocess to terminate. There is no simple fix here. You can arrange for your main program to not hang by not calling CombinedOutput
and using pipes instead, but that won't kill the subprocess.
I'm going to close this as a dup of #23019.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
For the following test:
The first test
TestOutput
runs into the test timeout and context timeout is not triggered:The second test
TestRun
works as expected:What did you expect to see?
That for both tests the context timeout of 2 seconds is triggered.
What did you see instead?
Only the second test behaves as expected.