You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2018/11/13 15:56:27 UTC

[GitHub] keith-turner commented on a change in pull request #761: Fix warnings and jar sealing issues with ITs

keith-turner commented on a change in pull request #761: Fix warnings and jar sealing issues with ITs
URL: https://github.com/apache/accumulo/pull/761#discussion_r233101932
 
 

 ##########
 File path: core/src/test/java/org/apache/accumulo/core/security/crypto/CryptoTest.java
 ##########
 @@ -339,13 +344,14 @@ public void testAESKeyUtilsLoadKekFromUriInvalidUri() {
     exception.expect(CryptoException.class);
     SecretKeySpec fileKey = AESKeyUtils.loadKekFromUri(
         System.getProperty("user.dir") + "/target/CryptoTest-testkeyfile-doesnt-exist");
+    fail("creation of " + fileKey + " should fail");
   }
 
   @Test
   public void testAESKeyUtilsLoadKekFromEmptyFile() {
     exception.expect(CryptoException.class);
     SecretKeySpec fileKey = AESKeyUtils.loadKekFromUri(emptyKeyPath);
-
+    fail("creation of " + fileKey + " should fail");
 
 Review comment:
   This seems unnecessary as the test should fail if not exception is thrown because of the rule.  If this was added because of a warning about an unused variable, then could the code be written as follows?
   
   ```java
     @Test
     public void testAESKeyUtilsLoadKekFromEmptyFile() {
       exception.expect(CryptoException.class);
       AESKeyUtils.loadKekFromUri(emptyKeyPath);
     }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services