go icon indicating copy to clipboard operation
go copied to clipboard

x/telemetry/counter/countertest: add countertest.Close

Open findleyr opened this issue 2 months ago • 1 comments

The countertest package exists to test telemetry instrumentation, with a countertest.Open(dir) API to initialize the counter file in a temp directory.

But on Windows, we can't clean up that directory while the counter file is open. I think we should add a countertest.Close() function to close the counter file.

This is non-trivial: the file mapping logic is complicated, and likely assumes that the file stays open.

findleyr avatar Jun 28 '24 18:06 findleyr