Skip to content

HDDS-5192. Intermittent failure in TestOzoneRpcClient due to volume name conflict#2220

Merged
bharatviswa504 merged 2 commits intoapache:masterfrom
adoroszlai:HDDS-5192
May 10, 2021
Merged

HDDS-5192. Intermittent failure in TestOzoneRpcClient due to volume name conflict#2220
bharatviswa504 merged 2 commits intoapache:masterfrom
adoroszlai:HDDS-5192

Conversation

@adoroszlai
Copy link
Contributor

What changes were proposed in this pull request?

The name of volume created in testListBucketsOnEmptyVolume or testListKeyOnEmptyBucket might contain the prefix used in testListVolume:

... Creating Volume: vol-71454, ...
...
... Creating Volume: vol-714-a-0-78727, ...

which leads to unexpected number of volumes with that prefix:

Tests run: 80, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 175.065 s <<< FAILURE! - in org.apache.hadoop.ozone.client.rpc.TestOzoneRpcClient
testListVolume  Time elapsed: 0.086 s  <<< FAILURE!
java.lang.AssertionError: expected:<20> but was:<21>
  ...
  at org.apache.hadoop.ozone.client.rpc.TestOzoneRpcClientAbstract.testListVolume(TestOzoneRpcClientAbstract.java:1867)

This fix simply changes to fix volume name for testListBucketsOnEmptyVolume and a different fix prefix for testListVolume, thus avoiding conflict.

https://issues.apache.org/jira/browse/HDDS-5192

How was this patch tested?

https://github.com/adoroszlai/hadoop-ozone/runs/2521726183

@adoroszlai adoroszlai self-assigned this May 7, 2021
@Test
public void testListVolume() throws IOException {
String volBase = "vol-" + RandomStringUtils.randomNumeric(3);
String volBase = "vol-list-";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the comment below as well
//Create 10 volume vol-<random>-a-0-<random> to vol-<random>-a-9-<random>
to denote the change here

Copy link
Member

@ayushtkn ayushtkn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bharatviswa504 bharatviswa504 merged commit 2061d7d into apache:master May 10, 2021
@bharatviswa504
Copy link
Contributor

Thank You @adoroszlai for the fix and @ayushtkn for the review.

@adoroszlai adoroszlai deleted the HDDS-5192 branch May 10, 2021 06:42
@adoroszlai
Copy link
Contributor Author

Thanks @ayushtkn and @bharatviswa504 for the review.

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.

3 participants