Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaky Test [Build&Test / metricbeat-pythonIntegTest / test_output – metricbeat.module.consul.test_consul.ConsulAgentTest_1] #24603

Closed
elasticmachine opened this issue Mar 17, 2021 · 3 comments
Labels
ci-reported Issues that have been automatically reported from the CI flaky-test Unstable or unreliable test cases. Team:Integrations Label for the Integrations team

Comments

@elasticmachine
Copy link
Collaborator

Flaky Test

Error details

AssertionError: Element counts were not equal: First has 1, Second has 0:  "runtime"

Stack Trace

self = <test_consul.ConsulAgentTest_1 testMethod=test_output>

    @unittest.skipUnless(metricbeat.INTEGRATION_TESTS, "integration test")
    @pytest.mark.tag("integration")
    def test_output(self):
        """
        Consul agent module outputs an event.
        """
        self.render_config_template(modules=[{
            "name": "consul",
            "metricsets": ["agent"],
            "hosts": self.get_hosts(),
            "period": "10s"
        }])
        proc = self.start_beat()
        self.wait_until(lambda: self.output_lines() > 0, max_timeout=30)
        proc.check_kill_and_wait()
        self.assert_no_logged_warnings()
    
        output = self.read_output_json()
        self.assertEqual(len(output), 1)
        evt = output[0]
    
        self.assertCountEqual(self.de_dot(CONSUL_FIELDS), evt.keys())
        consul_agent = evt["consul"]["agent"]
    
        consul_agent.pop("raft", None)
        consul_agent.pop("autopilot", None)
    
        print(consul_agent)
>       self.assertCountEqual(self.de_dot(AGENT_FIELDS), consul_agent.keys())
E       AssertionError: Element counts were not equal:
E       First has 1, Second has 0:  "runtime"

module/consul/test_consul.py:56: AssertionError
@elasticmachine elasticmachine added flaky-test Unstable or unreliable test cases. ci-reported Issues that have been automatically reported from the CI labels Mar 17, 2021
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Mar 17, 2021
@andresrc andresrc added the Team:Integrations Label for the Integrations team label Mar 18, 2021
@elasticmachine
Copy link
Collaborator Author

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Mar 18, 2021
@elasticmachine
Copy link
Collaborator Author

Flaky Test

Error details

AssertionError: Element counts were not equal: First has 1, Second has 0:  "runtime"

Stack Trace

self = <test_consul.ConsulAgentTest_1 testMethod=test_output>

    @unittest.skipUnless(metricbeat.INTEGRATION_TESTS, "integration test")
    @pytest.mark.tag("integration")
    def test_output(self):
        """
        Consul agent module outputs an event.
        """
        self.render_config_template(modules=[{
            "name": "consul",
            "metricsets": ["agent"],
            "hosts": self.get_hosts(),
            "period": "10s"
        }])
        proc = self.start_beat()
        self.wait_until(lambda: self.output_lines() > 0, max_timeout=30)
        proc.check_kill_and_wait()
        self.assert_no_logged_warnings()
    
        output = self.read_output_json()
        self.assertEqual(len(output), 1)
        evt = output[0]
    
        self.assertCountEqual(self.de_dot(CONSUL_FIELDS), evt.keys())
        consul_agent = evt["consul"]["agent"]
    
        consul_agent.pop("raft", None)
        consul_agent.pop("autopilot", None)
    
        print(consul_agent)
>       self.assertCountEqual(self.de_dot(AGENT_FIELDS), consul_agent.keys())
E       AssertionError: Element counts were not equal:
E       First has 1, Second has 0:  "runtime"

module/consul/test_consul.py:56: AssertionError

@jsoriano
Copy link
Member

Fixed in #24663.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-reported Issues that have been automatically reported from the CI flaky-test Unstable or unreliable test cases. Team:Integrations Label for the Integrations team
Projects
None yet
Development

No branches or pull requests

3 participants