Skip to content

testing: add Windows workarounds to testing.(*T).TempDir's cleanup #44919

@ainar-g

Description

@ainar-g

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.OS-Windows

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions