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

fixed two flaky tests in dmestore-service #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Ethan-Chin
Copy link

Fixed two flaky tests:

  1. com.huawei.dmestore.services.VmfsAccessServiceTest.unmountVmfs
  2. com.huawei.dmestore.services.VmfsOperationServiceImplTest.expandVmfs

Description

To reproduce the problem, first build the module dmestore-service:

mvn install -pl dmestore-service -am -DskipTests

To identify the flaky tests, execute the following nondex command:

mvn -pl dmestore-service  edu.illinois:nondex-maven-plugin:2.1.7:nondex -Dtest=com.huawei.dmestore.services.VmfsAccessServiceTest#unmountVmfs  -DnondexRuns=10

and

mvn -pl dmestore-service  edu.illinois:nondex-maven-plugin:2.1.7:nondex -Dtest=com.huawei.dmestore.services.VmfsOperationServiceImplTest#expandVmfs -DnondexRuns=10

The two flaky tests both results from incorrect assumptions about the order of the requestbody implemented by HashMap.

The fix incorporates LinkedHashMap to replace HashMap to keep the order consistency.

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

Successfully merging this pull request may close these issues.

1 participant