self = <test_golang.Test testMethod=test_stats>
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 = <test_golang.Test testMethod=test_stats>
cond = <function Test.test_stats.<locals>.<lambda> 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
Flaky Test
Test fails on Windows 10 builds
Stack Trace