-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Flaky Test]: TestContainerCMD – TempDir RemoveAll cleanup: unlinkat .../data: directory not empty #4246
Comments
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
it happened on my PR as well: https://buildkite.com/elastic/elastic-agent/builds/7454#018dd49c-2570-483c-b055-2a64a7a20ada |
CC @belimawr The test cleanup is in elastic-agent/testing/integration/container_cmd_test.go Lines 89 to 99 in eaf3c43
The command is started via elastic-agent/pkg/testing/fixture.go Lines 669 to 674 in eaf3c43
Cancelling the context should kill the process and let us stop using the cleanup function, we could also gracefully call I do think the actual problem is that something is still accessing the elastic-agent/pkg/testing/fixture.go Line 208 in eaf3c43
See golang/go#43547 Possibly the real fix is to poll for the |
What do you mean? I call
I agree. You mean in the Cleanup function, after we call I checked the docs for
It seems we have to call |
I mean why do we call It looks like the |
I'l make a quick PR to fix that. |
Here is the fix: #4695 |
Failing test case
TestContainerCMD
Error message
One of the directories created with t.TempDir() cannot be cleaned up
Build
https://buildkite.com/elastic/elastic-agent/builds/7054#018d9e30-e528-45a6-b191-402d9e7a6b89
OS
Linux
Stacktrace and notes
The text was updated successfully, but these errors were encountered: