adoroszlai opened a new pull request #1689:
URL: https://github.com/apache/ozone/pull/1689


   ## What changes were proposed in this pull request?
   
   `TestOzoneClientRetriesOnException#testMaxRetriesByOzoneClient` 
intermittently fails with:
   
   ```
   
testMaxRetriesByOzoneClient(org.apache.hadoop.ozone.client.rpc.TestOzoneClientRetriesOnException)
  Time elapsed: 42.789 s  <<< FAILURE!
   java.lang.AssertionError: Expected exception not thrown
        at org.junit.Assert.fail(Assert.java:88)
        at 
org.apache.hadoop.ozone.client.rpc.TestOzoneClientRetriesOnException.testMaxRetriesByOzoneClient(TestOzoneClientRetriesOnException.java:235)
   ```
   
   The problem happens if the number of distinct containers used for the key is 
less than 4.  In this case max number of retries (3) is never reached.
   
   Normal execution:
   
   ```
   block: conID: 1 locID: 105357240184995843 bcsId: 0
   block: conID: 2 locID: 105357240185061380 bcsId: 0
   block: conID: 3 locID: 105357240185061381 bcsId: 0
   block: conID: 4 locID: 105357240185061382 bcsId: 0
   ```
   
   Failing execution:
   
   ```
   block: conID: 1 locID: 105357233754603523 bcsId: 0
   block: conID: 2 locID: 105357233754603524 bcsId: 0
   block: conID: 1 locID: 105357233754669061 bcsId: 0
   ```
   
   This change adds some assumptions as a workaround.  This way if not enough 
containers are allocated, the test is skipped.  It also adds a constant for 
max. retries for clarity.
   
   https://issues.apache.org/jira/browse/HDDS-4577
   
   ## How was this patch tested?
   
   Ran test locally.  Samples:
   
   ```
   Tests run: 2, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 51.416 s - 
in org.apache.hadoop.ozone.client.rpc.TestOzoneClientRetriesOnException
   Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 52.201 s - 
in org.apache.hadoop.ozone.client.rpc.TestOzoneClientRetriesOnException
   ```
   
   https://github.com/adoroszlai/hadoop-ozone/runs/1533402668#step:4:3307


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to