self = <test_shutdown.Test testMethod=test_shutdown>
def test_shutdown(self):
"""
Test starting and stopping Filebeat under load.
"""
self.nasa_logs()
self.render_config_template(
path=os.path.abspath(self.working_dir) + "/log/*",
ignore_older="1h"
)
for i in range(1, 5):
proc = self.start_beat(logging_args=["-e", "-v"])
time.sleep(.5)
> proc.check_kill_and_wait()
tests\system\test_shutdown.py:28:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\libbeat\tests\system\beat\beat.py:105: in check_kill_and_wait
return self.check_wait(exit_code=exit_code)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <beat.beat.Proc object at 0x02BABF88>, exit_code = 0
def check_wait(self, exit_code=0):
actual_exit_code = self.wait()
> assert actual_exit_code == exit_code, "Expected exit code to be %d, but it was %d" % (
exit_code, actual_exit_code)
E AssertionError: Expected exit code to be 0, but it was 2
..\libbeat\tests\system\beat\beat.py:93: AssertionError
Flaky Test
Test failure:
AssertionError: Expected exit code to be 0, but it was 2
Stack Trace