In #30789 (CL 172337) a workaround was added to the go command to help with the access denied and similar errors when running tests on Windows. The errors are thought to arise because of antivirus software and similar programs interfering. Currently, similar errors can still happen when using testing.(*T).TempDir during its cleanup stage:
testing.go:915: TempDir RemoveAll cleanup: remove C:\Users\RUNNER~1\AppData\Local\Temp\TestQLogFile_SeekTS_bad010877688\002\812736234.txt: The process cannot access the file because it is being used by another process.
I think that a similar workaround should be applied there. Applying it manually seems to fix the issue.
In #30789 (CL 172337) a workaround was added to the
gocommand to help with theaccess deniedand similar errors when running tests on Windows. The errors are thought to arise because of antivirus software and similar programs interfering. Currently, similar errors can still happen when usingtesting.(*T).TempDirduring its cleanup stage:I think that a similar workaround should be applied there. Applying it manually seems to fix the issue.