Flaky Test: [metricbeat.module.golang.test_golang.Test test_stats] windows 10
- Dominant language
- Go
- Stars
- 12.7k
- Forks
- 5k
- Avg merge
- 2d 15m
- Merged PRs (30d)
- 385
Description
## Flaky Test
Test fails on Windows 10 builds
* **Test Name:** test_stats
* **Link:** https://github.com/elastic/beats/blob/master/metricbeat/module/golang/test_golang.py#L12
* **Branch:** michel-laterman:go-1.16.3, master
* **Artifact Link:** N/A
* **Notes:** N/A
### Stack Trace
```
self =
def test_stats(self):
"""
golang heap test
"""
self.render_config_template(modules=[{
"name": "golang",
"metricsets": ["heap"],
"hosts": ["http://localhost:6060"],
"period": "1s"
}])
proc = self.start_beat(
extra_args=["-httpprof", "localhost:6060"])
> self.wait_until(lambda: self.output_lines() > 0)
module\golang\test_golang.py:25:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
cond = . at 0x000001A155CE9700>
max_timeout = 10, poll_interval = 0.1, name = 'cond'
def wait_until(self, cond, max_timeout=10, poll_interval=0.1, name="cond"):
"""
Waits until the cond function returns true,
or until the max_timeout is reached. Calls the cond
function every poll_interval seconds.
If the max_timeout is reached before cond() returns
true, an exception is raised.
"""
start = datetime.now()
while not cond():
if datetime.now() - start > timedelta(seconds=max_timeout):
> raise TimeoutError("Timeout waiting for '{}' to be true. ".format(name) +
"Waited {} seconds.".format(max_timeout))
E beat.beat.TimeoutError: Timeout waiting for 'cond' to be true. Waited 10 seconds.
..\libbeat\tests\system\beat\beat.py:362: TimeoutError
```
Contributor guide
Research direction
Start with metricbeat/module/golang/test_golang.py at test_stats and run the test on Windows 10. Read the failure around wait_until in libbeat/tests/system/beat/beat.py to determine why output_lines() does not become positive within 10 seconds; done means test_stats runs reliably on Windows 10 builds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100