[Flaky Test] github.com/elastic/beats/v7/filebeat/input/filestream TestFilestreamDeleteFileRemoveRetries/exhausted_retries_returns_error
- Dominant language
- Go
- Stars
- 12.7k
- Forks
- 5k
- Avg merge
- 2d 15m
- Merged PRs (30d)
- 385
Description
## Flaky Test
* **Test Name:** TestFilestreamDeleteFileRemoveRetries/exhausted_retries_returns_error
* **Scope:** github.com/elastic/beats/v7/filebeat/input/filestream
* **File:** N/A
* **Location:** N/A
* **Buildkite Link:** https://buildkite.com/organizations/elastic/analytics/suites/beats/tests/7053cbe5-4ad3-83ae-b246-5f52d4e577fa
* **Flaky Instances:** 1
* **Latest Occurrence:** 2026-04-08T08:07:25.717Z
### Details
```json
{
"id": "7053cbe5-4ad3-83ae-b246-5f52d4e577fa",
"web_url": "https://buildkite.com/organizations/elastic/analytics/suites/beats/tests/7053cbe5-4ad3-83ae-b246-5f52d4e577fa",
"scope": "github.com/elastic/beats/v7/filebeat/input/filestream",
"name": "TestFilestreamDeleteFileRemoveRetries/exhausted_retries_returns_error",
"location": null,
"file_name": null,
"instances": 1,
"latest_occurrence_at": "2026-04-08T08:07:25.717Z",
"most_recent_instance_at": "2026-04-08T08:07:25.717Z",
"last_resolved_at": null,
"ownership_team_ids": [],
"failure_examples_count": 1
}
```
### Failure Examples
**Example 1:**
**Run:** https://api.buildkite.com/v2/analytics/organizations/elastic/suites/beats/runs/c4494b13-5e51-8634-b96e-9e34cbcb414c
**Time:** 2026-04-08T06:49:30.761Z
**Stacktrace:**
```
=== RUN TestFilestreamDeleteFileRemoveRetries/exhausted_retries_returns_error
input_delete_integration_test.go:376:
Error Trace: /opt/buildkite-agent/builds/bk-agent-prod-gcp-1775630755004606607/elastic/filebeat/filebeat/input/filestream/input_delete_integration_test.go:376
Error: Condition never satisfied
Test: TestFilestreamDeleteFileRemoveRetries/exhausted_retries_returns_error
Messages: removeFn was not called
--- FAIL: TestFilestreamDeleteFileRemoveRetries/exhausted_retries_returns_error (1.00s)
```
Contributor guide
Research direction
Start with filebeat/input/filestream/input_delete_integration_test.go around line 376 and run TestFilestreamDeleteFileRemoveRetries/exhausted_retries_returns_error. Investigate why removeFn is not called before the one-second condition timeout. Done means the test reliably exercises exhausted retries and returns the expected error without flaky failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100