Repository navigation
Description
Flaky-test: org.apache.pulsar.broker.service.PersistentTopicE2ETest.testBrokerConnectionStats
Number of failures: 12
org.apache.pulsar.broker.service.PersistentTopicE2ETest is flaky. The testBrokerConnectionStats test method fails sporadically.
java.lang.AssertionError: expected [0] but found [1]
at org.testng.Assert.fail(Assert.java:99)
at org.testng.Assert.failNotEquals(Assert.java:1037)
at org.testng.Assert.assertEqualsImpl(Assert.java:140)
at org.testng.Assert.assertEquals(Assert.java:122)
at org.testng.Assert.assertEquals(Assert.java:797)
at org.testng.Assert.assertEquals(Assert.java:807)
at org.apache.pulsar.broker.service.PersistentTopicE2ETest.testBrokerConnectionStats(PersistentTopicE2ETest.java:1506)
Usage tip: To enable automatic navigation to failure message, open the following links with CTRL/CMD-click.
example failure 2021-04-03T11:15:23.6234257Z
example failure 2021-04-02T16:29:14.4813072Z
example failure 2021-04-02T15:36:51.8947029Z
example failure 2021-04-02T10:01:02.9570249Z
example failure 2021-04-02T09:57:27.1343835Z
example failure 2021-04-02T04:21:09.6381132Z
example failure 2021-04-02T04:11:23.4677940Z
example failure 2021-04-02T01:11:54.9818904Z
example failure 2021-04-01T15:35:36.9708663Z
example failure 2021-03-31T14:12:28.6718791Z
example failure 2021-03-30T14:58:20.6333280Z
example failure 2021-03-30T06:00:38.9159705Z
Full exception stacktrace
java.lang.AssertionError: expected [0] but found [1]
at org.testng.Assert.fail(Assert.java:99)
at org.testng.Assert.failNotEquals(Assert.java:1037)
at org.testng.Assert.assertEqualsImpl(Assert.java:140)
at org.testng.Assert.assertEquals(Assert.java:122)
at org.testng.Assert.assertEquals(Assert.java:797)
at org.testng.Assert.assertEquals(Assert.java:807)
at org.apache.pulsar.broker.service.PersistentTopicE2ETest.testBrokerConnectionStats(PersistentTopicE2ETest.java:1506)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
at org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:45)
at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:73)
at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:11)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Flaky-test: org.apache.pulsar.broker.service.persistent.PersistentTopicStreamingDispatcherE2ETest.testBrokerConnectionStats
Number of failures: 20
org.apache.pulsar.broker.service.persistent.PersistentTopicStreamingDispatcherE2ETest is flaky. The testBrokerConnectionStats test method fails sporadically.
java.lang.AssertionError: expected [0] but found [1]
at org.testng.Assert.fail(Assert.java:99)
at org.testng.Assert.failNotEquals(Assert.java:1037)
at org.testng.Assert.assertEqualsImpl(Assert.java:140)
at org.testng.Assert.assertEquals(Assert.java:122)
at org.testng.Assert.assertEquals(Assert.java:797)
at org.testng.Assert.assertEquals(Assert.java:807)
at org.apache.pulsar.broker.service.PersistentTopicE2ETest.testBrokerConnectionStats(PersistentTopicE2ETest.java:1506)
Usage tip: To enable automatic navigation to failure message, open the following links with CTRL/CMD-click.
example failure 2021-04-02T21:38:57.9191834Z
example failure 2021-04-02T17:58:56.5823267Z
example failure 2021-04-02T15:39:57.3252792Z
example failure 2021-04-02T12:50:47.4128805Z
example failure 2021-04-02T10:52:12.3570456Z
example failure 2021-04-02T10:04:27.9558184Z
example failure 2021-04-02T08:23:36.8542461Z
example failure 2021-04-02T07:36:20.9691253Z
example failure 2021-04-02T05:04:50.9540054Z
example failure 2021-04-02T00:13:04.4592528Z
example failure 2021-04-01T20:07:41.5538938Z
example failure 2021-04-01T17:51:26.2247828Z
example failure 2021-04-01T11:53:52.1246226Z
example failure 2021-04-01T11:03:04.0119695Z
example failure 2021-04-01T05:17:24.3980445Z
example failure 2021-03-31T21:03:46.2161428Z
example failure 2021-03-31T20:46:37.4574830Z
example failure 2021-03-31T15:18:26.3112968Z
example failure 2021-03-31T09:28:48.1295553Z
example failure 2021-03-29T17:25:55.2115982Z
Full exception stacktrace
java.lang.AssertionError: expected [0] but found [1]
at org.testng.Assert.fail(Assert.java:99)
at org.testng.Assert.failNotEquals(Assert.java:1037)
at org.testng.Assert.assertEqualsImpl(Assert.java:140)
at org.testng.Assert.assertEquals(Assert.java:122)
at org.testng.Assert.assertEquals(Assert.java:797)
at org.testng.Assert.assertEquals(Assert.java:807)
at org.apache.pulsar.broker.service.PersistentTopicE2ETest.testBrokerConnectionStats(PersistentTopicE2ETest.java:1506)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
at org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:45)
at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:73)
at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:11)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Activity
[CI] Move flaky tests that fail very often to "quarantine" test group (…
lhotari commentedon Oct 31, 2021
Flaky-test: org.apache.pulsar.broker.service.PersistentTopicE2ETest.testBrokerConnectionStats
Number of failures: 4
org.apache.pulsar.broker.service.PersistentTopicE2ETest is flaky. The testBrokerConnectionStats test method fails sporadically.
Usage tip: To enable automatic navigation to failure message, open the following links with CTRL/CMD-click.
example failure 2021-10-27T01:00:55.5399435Z
example failure 2021-10-26T10:42:53.4397406Z
example failure 2021-10-26T01:14:15.0111466Z
example failure 2021-10-25T16:31:59.8488187Z
Full exception stacktrace
lhotari commentedon Oct 31, 2021
Flaky-test: org.apache.pulsar.broker.service.persistent.PersistentTopicStreamingDispatcherE2ETest.testBrokerConnectionStats
Number of failures: 1
org.apache.pulsar.broker.service.persistent.PersistentTopicStreamingDispatcherE2ETest is flaky. The testBrokerConnectionStats test method fails sporadically.
Usage tip: To enable automatic navigation to failure message, open the following links with CTRL/CMD-click.
example failure 2021-10-27T06:11:54.7030960Z
Full exception stacktrace
lhotari commentedon Nov 22, 2021
Recent example: https://github.com/apache/pulsar/runs/4284726558?check_suite_focus=true#step:9:230
lhotari commentedon Nov 23, 2021
Again https://github.com/apache/pulsar/runs/4296627336?check_suite_focus=true#step:9:209
lhotari commentedon Nov 23, 2021
Yet another https://github.com/apache/pulsar/runs/4298693944?check_suite_focus=true#step:9:209
lhotari commentedon Nov 23, 2021
and again https://github.com/apache/pulsar/runs/4298938580?check_suite_focus=true#step:9:209
lhotari commentedon Feb 3, 2022
Flaky-test: org.apache.pulsar.broker.service.PersistentTopicE2ETest.testBrokerConnectionStats
Number of failures: 11
org.apache.pulsar.broker.service.PersistentTopicE2ETest is flaky. The testBrokerConnectionStats test method fails sporadically.
Usage tip: To enable automatic navigation to failure message, open the following links with CTRL/CMD-click.
example failure 2022-01-31T03:34:15.9880199Z
example failure 2022-01-29T18:06:01.9475596Z
example failure 2022-01-29T09:54:10.1368754Z
example failure 2022-01-29T07:31:14.1314372Z
example failure 2022-01-29T04:52:50.1558884Z
example failure 2022-01-29T04:24:45.2750850Z
example failure 2022-01-28T12:30:25.2347297Z
example failure 2022-01-28T12:25:16.1869943Z
example failure 2022-01-28T09:19:58.4188493Z
example failure 2022-01-28T02:28:49.6469327Z
example failure 2022-01-27T15:30:30.7044609Z
Full exception stacktrace
horizonzy commentedon Apr 28, 2022
I will try to fix it.
zymap commentedon Apr 28, 2022
again: https://github.com/apache/pulsar/runs/5878639079
fix flaky test apache#10150.
horizonzy commentedon Apr 28, 2022
The metrics come from:
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/BrokerOperabilityMetrics.java
Lines 74 to 82 in 24d4d76
The invoke chain:
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
Line 338 in 24d4d76
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PulsarStats.java
Lines 245 to 247 in 24d4d76
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/BrokerOperabilityMetrics.java
Lines 144 to 147 in 24d4d76
So we can get info, when channel inactive, it will decrease
connectionActive.At the tests.
pulsar/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentTopicE2ETest.java
Line 1570 in 24d4d76
It judge
brk_active_connections == 0, but at the same time, we can't guarantee the channel inactive be invoked. So the problem occur.Reproduce
It can be reproduce by change location3 code to
Conclusion:
So we need guarantee the
assertafterchannel inactive.