Skip to content

Metricbeat test for module/zookeeper/test_zookeeper is flaky on CI #40468

Open

Description

Flaky Test

Stack Trace

See Buildkite failed CI output: https://buildkite.com/elastic/beats-metricbeat/builds/8277#01913221-21ac-4bf2-a32c-495f265f4b6f/166-438

module/zookeeper/test_zookeeper.py F.....                                                                                                                [100%]
=========================================================================== FAILURES ===========================================================================
_____________________________________________________________ ZooKeeperMntrTest_0.test_connection ______________________________________________________________
self = <test_zookeeper.ZooKeeperMntrTest_0 testMethod=test_connection>
    @unittest.skipUnless(metricbeat.INTEGRATION_TESTS, "integration test")
    @pytest.mark.tag('integration')
    def test_connection(self):
        """
        ZooKeeper server module outputs an event.
        """
        self.render_config_template(modules=[{
            "name": "zookeeper",
            "metricsets": ["connection"],
            "hosts": self.get_hosts(),
            "period": "5s"
        }])
        proc = self.start_beat()
        self.wait_until(lambda: self.output_lines() > 0)
        proc.check_kill_and_wait()
        self.assert_no_logged_warnings()
        output = self.read_output_json()
>       self.assertEqual(len(output), 1)
E       AssertionError: 2 != 1
module/zookeeper/test_zookeeper.py:102: AssertionError

Reproduction

Follow the instructions in https://docs.elastic.dev/ingest-dev-docs/beats/beats-ci#reproducing-pull-request-failures to launch an identical worker. If it doesn't reproduce at first try, you may need to run mage pythonIntegTest a few times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Team:Obs-InfraObsLabel for the Observability Infrastructure Monitoring teamflaky-testUnstable or unreliable test cases.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions