You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/01/01 17:33:24 UTC

[GitHub] [ozone] adoroszlai opened a new pull request #2955: HDDS-6146. TestDefaultCAServer#testIntermediaryCA failure

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


   ## What changes were proposed in this pull request?
   
   `TestDefaultCAServer#testIntermediaryCA` started failing on Jan 1st, because the test relies on the exact return value of `LocalDate#compare`:
   
   ```
   expected:<10> but was:<9>
   ```
   
   For dates in different years, `LocalDate#compare` seems to return the difference in years, but this is an implementation detail.  Return values of `compare` (and `compareTo`) should only be checked against 0, not specific other values.
   
   A period of 3650 days (`P3650D`) is always less than 10 whole years due to leap years, which have an extra day.  However, "today" + 3650 days usually falls in the 10th year from now, except for the first 2-3 days of each year (depending on the number of leap years in the period).
   
   ```
   2031-12-30 cmp 2022-01-01 = 9
   2031-12-31 cmp 2022-01-02 = 9
   ```
   
   https://issues.apache.org/jira/browse/HDDS-6146
   
   ## How was this patch tested?
   
   ```
   [INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.143 s - in org.apache.hadoop.hdds.security.x509.certificate.authority.TestDefaultCAServer
   ```
   
   https://github.com/adoroszlai/hadoop-ozone/runs/4679914119


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai commented on pull request #2955: HDDS-6146. TestDefaultCAServer#testIntermediaryCA failure

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on pull request #2955:
URL: https://github.com/apache/ozone/pull/2955#issuecomment-1004938147


   Thanks @sodonnel for the review.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai merged pull request #2955: HDDS-6146. TestDefaultCAServer#testIntermediaryCA failure

Posted by GitBox <gi...@apache.org>.
adoroszlai merged pull request #2955:
URL: https://github.com/apache/ozone/pull/2955


   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org