elastic / elastic/beats

[Flaky Test] filebeat/input/filestream/internal/input-logfile TestDefaultHarvesterGroup/assert_a_harvester_can_be_stopped_and_removed_from_bookkeeper

Open
#24,764 4 comments 0 reactions 0 assignees View on GitHub
ci-reported flaky-test Team:Elastic-Agent Team:Elastic-Agent-Data-Plane
Dominant language
Go
Stars
12.7k
Forks
5k
Avg merge
2d 15m
Merged PRs (30d)
385

Description

## Flaky Test

* **Test Name:** TestDefaultHarvesterGroup/assert_a_harvester_can_be_stopped_and_removed_from_bookkeeper
* **Link:** https://github.com/elastic/beats/blob/master/filebeat/input/filestream/internal/input-logfile/harvester_test.go#L134-L149
* **Branch:** master
* **Artifact Link:** https://beats-ci.elastic.co//blue/rest/organizations/jenkins/pipelines/Beats/pipelines/beats/pipelines/PR-24312/runs/8/steps/11159/log/?start=0

### Stack Trace

```
[2021-03-24T14:20:56.996Z] === FAIL: filebeat/input/filestream/internal/input-logfile TestDefaultHarvesterGroup/assert_a_harvester_can_be_stopped_and_removed_from_bookkeeper (0.00s)
[2021-03-24T14:20:56.996Z] harvester_test.go:108:
[2021-03-24T14:20:56.996Z] Error Trace: harvester_test.go:108
[2021-03-24T14:20:56.996Z] harvester_test.go:151
[2021-03-24T14:20:56.996Z] Error: Should be false
[2021-03-24T14:20:56.996Z] Test: TestDefaultHarvesterGroup/assert_a_harvester_can_be_stopped_and_removed_from_bookkeeper
[2021-03-24T14:20:56.996Z] --- FAIL: TestDefaultHarvesterGroup/assert_a_harvester_can_be_stopped_and_removed_from_bookkeeper (0.00s)
[2021-03-24T14:20:56.997Z]
[2021-03-24T14:20:56.997Z] === FAIL: filebeat/input/filestream/internal/input-logfile TestDefaultHarvesterGroup (0.03s)
[2021-03-24T14:20:56.997Z]
[2021-03-24T14:20:56.997Z] DONE 719 tests, 5 skipped, 2 failures in 51.535s
[2021-03-24T14:20:57.260Z] Error: go test returned a non-zero value: exit status 1
script returned exit code 1
```

Contributor guide

Open the contributing guide

Research direction

Start with filebeat/input/filestream/internal/input-logfile/harvester_test.go, especially the failure helper at lines 108 and 134-151. Run TestDefaultHarvesterGroup and inspect why the harvester is still present when the stop-and-remove assertion runs; done means the targeted test passes reliably without the reported flake.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.