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: ManagedCursorMetricsTest.testCursorReadWriteMetrics #16948

Closed
RobertIndie opened this issue Aug 4, 2022 · 3 comments · Fixed by #17045
Closed

Flaky-test: ManagedCursorMetricsTest.testCursorReadWriteMetrics #16948

RobertIndie opened this issue Aug 4, 2022 · 3 comments · Fixed by #17045

Comments

@RobertIndie
Copy link
Member

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)
@RobertIndie
Copy link
Member Author

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]

@coderzc
Copy link
Member

coderzc commented Aug 8, 2022

@poorbarcode
Copy link
Contributor

poorbarcode commented Aug 10, 2022

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"

@Technoboy- Technoboy- changed the title Flaky-test: ManagedCursorMetricsTest. testManagedCursorMetrics Flaky-test: ManagedCursorMetricsTest.testCursorReadWriteMetrics Aug 11, 2022
@codelipenghui codelipenghui moved this from To do to Reviewer approved in Apache Pulsar / Flaky Tests Aug 11, 2022
Apache Pulsar / Flaky Tests automation moved this from Reviewer approved to Done Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants