You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "fapifta (via GitHub)" <gi...@apache.org> on 2023/03/13 10:14:35 UTC

[GitHub] [ozone] fapifta commented on a diff in pull request #4380: HDDS-8134. Certificate clients are not correctly closed.

fapifta commented on code in PR #4380:
URL: https://github.com/apache/ozone/pull/4380#discussion_r1133706182


##########
hadoop-hdds/framework/src/test/java/org/apache/hadoop/hdds/security/x509/certificate/client/TestDefaultCertificateClient.java:
##########
@@ -532,4 +544,53 @@ public void testRenewAndStoreKeyAndCertificate() throws Exception {
     // a success renew after auto cleanup new key and cert dir
     dnCertClient.renewAndStoreKeyAndCertificate(true);
   }
+
+  @Test
+  public void testCloseCertificateClient(@TempDir File metaDir)

Review Comment:
   We have a certificate lifetime monitor, that is scheduled to be run by a scheduled executor service.
   The intention here is to check if after we close the client (which should shut down the executorservice), there are no monitoring thread scheduled to be run. As most of the API is private, the test validates the effects that are visible outside.
   
   Once the client is instantiated, there has to be a scheduled thread with the name compName + "-CertificateLifetimeMonitor", then when the client is closed, and the thread is terminated by the shutdown call in the scheduled executor, the test checks that the thread exists after instantiation, and then it checks there is no thread anymore with the name we expect for the monitor thread after close. 



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