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

Fix flaky test in TopicControllerTest.java #119

Closed
yannizhou05 opened this issue Nov 18, 2022 · 0 comments
Closed

Fix flaky test in TopicControllerTest.java #119

yannizhou05 opened this issue Nov 18, 2022 · 0 comments

Comments

@yannizhou05
Copy link
Contributor

BUG REPORT

The test below in TopicControllerTest.java was found flaky because of the ordering of elements in result HashSet. The orders of elements in the HashSet were not the same every time being called. In this case, containsInAnyOrder was applied to ensure the orders do not cause the flakiness. This code change is trying to fix the flaky tests mentioned above, because they sometimes fail (as the picture showed) and sometimes pass. The failure could be reproduced by the commands above by using the tool of NonDex. The code change is to make sure the tests will always pass in this case.

  • org.apache.rocketmq.dashboard.controller.TopicControllerTest.testList

The test failures could be reproduced by

  1. mvn install -pl . -am -DskipTests
  2. run tests with NonDex
    mvn -pl . edu.illinois:nondex-maven-plugin:2.1:nondex -Dtest=org.apache.rocketmq.dashboard.controller.TopicControllerTest#testList

1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants