Skip to content

Commit c403afa

Browse files
faecmergify[bot]
authored andcommitted
[Flaky test] Disable flaky zookeeper tests (#43381)
Disable the flaky test `metricbeat/module/zookeeper/test_zookeeper`, reported in #43385. Also add a message to the failing assertions indicating the actual data the tests failed on, so when a failure does happen we can see what caused it. (cherry picked from commit 9e29bcb)
1 parent bab5651 commit c403afa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

metricbeat/module/zookeeper/test_zookeeper.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"approximate_data_size", "num_alive_connections"]
1515

1616

17+
@unittest.skip("flaky test suite: https://github.com/elastic/beats/issues/43385")
1718
@metricbeat.parameterized_with_supported_versions
1819
class ZooKeeperMntrTest(metricbeat.BaseTest):
1920

@@ -37,7 +38,7 @@ def test_output(self):
3738
self.assert_no_logged_warnings()
3839

3940
output = self.read_output_json()
40-
self.assertEqual(len(output), 1)
41+
self.assertEqual(len(output), 1, f"expected one output result, got: {output}")
4142
evt = output[0]
4243

4344
self.assertCountEqual(self.de_dot(ZK_FIELDS), evt.keys())
@@ -71,7 +72,7 @@ def test_output(self):
7172
self.assert_no_logged_warnings()
7273

7374
output = self.read_output_json()
74-
self.assertEqual(len(output), 1)
75+
self.assertEqual(len(output), 1, f"expected one output result, got: {output}")
7576
evt = output[0]
7677

7778
self.assertCountEqual(self.de_dot(ZK_FIELDS), evt.keys())
@@ -99,7 +100,7 @@ def test_connection(self):
99100
self.assert_no_logged_warnings()
100101

101102
output = self.read_output_json()
102-
self.assertEqual(len(output), 1)
103+
self.assertEqual(len(output), 1, f"expected one output result, got: {output}")
103104
evt = output[0]
104105

105106
self.assertCountEqual(self.de_dot(ZK_FIELDS + ["client"]), evt.keys())

0 commit comments

Comments
 (0)