Skip to content

Flaky-test: ManagedCursorMetricsTest.testCursorReadWriteMetrics #16948

Closed

Description

@RobertIndie

ManagedCursorMetricsTest. testManagedCursorMetrics is flaky. It fails sporadically.

#16878 didn't fix the issue. The problem still exists in the latest code.

example failure

  Error:  testCursorReadWriteMetrics(org.apache.pulsar.broker.stats.ManagedCursorMetricsTest)  Time elapsed: 0.449 s  <<< FAILURE!
  java.lang.AssertionError: did not expect [0] but found [0]
  	at org.testng.Assert.fail(Assert.java:99)
  	at org.testng.Assert.failEquals(Assert.java:1041)
  	at org.testng.Assert.assertNotEqualsImpl(Assert.java:147)
  	at org.testng.Assert.assertNotEquals(Assert.java:1531)
  	at org.testng.Assert.assertNotEquals(Assert.java:1535)
  	at org.apache.pulsar.broker.stats.ManagedCursorMetricsTest.testCursorReadWriteMetrics(ManagedCursorMetricsTest.java:246)

Activity

  1. RobertIndie commented on Aug 4, 2022

    @RobertIndie
    MemberAuthor

    From the test log we can see that there are many zookeeper connection exceptions during the test:

    2022-08-04T07:27:04,903 - INFO  - [main-SendThread(127.0.0.1:45483):ClientCnxn$SendThread@1171] - Opening socket connection to server localhost/127.0.0.1:45483.
    2022-08-04T07:27:04,903 - INFO  - [main-SendThread(127.0.0.1:45483):ClientCnxn$SendThread@1173] - SASL config status: Will not attempt to authenticate using SASL (unknown error)
    2022-08-04T07:27:04,904 - WARN  - [main-SendThread(127.0.0.1:45483):ClientCnxn$SendThread@1292] - Session 0x100000c35b70002 for server localhost/127.0.0.1:45483, Closing socket connection. Attempting reconnect except it is a SessionExpiredException.
    java.net.ConnectException: Connection refused
    	at sun.nio.ch.Net.pollConnect(Native Method) ~[?:?]
    	at sun.nio.ch.Net.pollConnectNow(Net.java:672) ~[?:?]
    	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:946) ~[?:?]
    	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:344) ~[zookeeper-3.8.0.jar:3.8.0]
    	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1282) ~[zookeeper-3.8.0.jar:3.8.0]
    
  2. poorbarcode commented on Aug 10, 2022

    @poorbarcode
    Contributor

    Hi @RobertIndie , @coderzc

    #16878 didn't fix the issue. The problem still exists in the latest code.
    https://github.com/apache/pulsar/runs/7718272297?check_suite_focus=true

    #16878 fixed testManagedCursorMetrics, the log you provided is another method testCursorReadWriteMetrics, the title of this issue should change to "Flaky-test: ManagedCursorMetricsTest.testCursorReadWriteMetrics"

  3. changed the title [-]Flaky-test: ManagedCursorMetricsTest. testManagedCursorMetrics[/-] [+]Flaky-test: ManagedCursorMetricsTest.testCursorReadWriteMetrics[/+] on Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions