ayushtkn commented on a change in pull request #1838:
URL: https://github.com/apache/ozone/pull/1838#discussion_r563943065
##########
File path:
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/security/TestOzoneBlockTokenSecretManager.java
##########
@@ -328,7 +328,7 @@ public void testNetYetValidCertificate() throws Exception {
private X509Certificate generateExpiredCert(String dn,
KeyPair pair, String algorithm) throws CertificateException,
IllegalStateException, IOException, OperatorCreationException {
- Date from = new Date();
+ Date from = new Date(Instant.now().toEpochMilli() - 100L);
Date to = new Date(from.getTime() + 100L);
return generateTestCert(dn, pair, algorithm, from, to);
Review comment:
Can we just do -
`` generateTestCert(dn, pair, algorithm, from, from);``
Means eliminate the `to` and pass `from` only instead, rather than this?
----------------------------------------------------------------
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]