mtien-apache commented on a change in pull request #4767:
URL: https://github.com/apache/nifi/pull/4767#discussion_r564863246



##########
File path: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenHTTP.java
##########
@@ -105,22 +101,45 @@
     private int availablePort;
 
     @BeforeClass
-    public static void setUpSuite() {
+    public static void setUpSuite() throws IOException, 
GeneralSecurityException {
         Assume.assumeTrue("Test only runs on *nix", 
!SystemUtils.IS_OS_WINDOWS);
+
+        clientTlsConfiguration = 
KeyStoreUtils.createTlsConfigAndNewKeystoreTruststore();
+
+        trustOnlyTlsConfiguration = new StandardTlsConfiguration(
+                null, null, null, null,
+                clientTlsConfiguration.getTruststorePath(), 
clientTlsConfiguration.getTruststorePassword(),
+                clientTlsConfiguration.getTruststoreType(), 
TlsConfiguration.getHighestCurrentSupportedTlsProtocolVersion());
+    }
+
+    @AfterClass
+    public static void afterClass() throws Exception {
+        if (clientTlsConfiguration != null) {
+            try {
+                if 
(StringUtils.isNotBlank(clientTlsConfiguration.getKeystorePath())) {
+                    
java.nio.file.Files.deleteIfExists(Paths.get(clientTlsConfiguration.getKeystorePath()));

Review comment:
       @exceptionfactory `com.google.common.io.Files` was already imported but 
is using `append()`, which is deprecated. On your suggestion, I re-factored the 
method and can now properly import `java.nio.file.Files`. Thanks.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to