ctubbsii commented on a change in pull request #641:  Fix crypto tests writing 
to /tmp
URL: https://github.com/apache/accumulo/pull/641#discussion_r216506967
 
 

 ##########
 File path: 
core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java
 ##########
 @@ -1787,137 +1789,146 @@ private void runVersionTest(int version, 
AccumuloConfiguration aconf) throws IOE
     reader.close();
   }
 
-  public static AccumuloConfiguration getAccumuloConfig(String 
cryptoConfSetting) {
-    return new 
SiteConfiguration(CryptoTest.class.getClassLoader().getResource(cryptoConfSetting));
+  public static AccumuloConfiguration getAccumuloConfig(boolean cryptoOn) {
+    ConfigurationCopy cfg = new 
ConfigurationCopy(DefaultConfiguration.getInstance());
+    if (cryptoOn) {
 
 Review comment:
   Bools are frustrating, because they don't carry semantic intent. Java 8 
supports switch statements on String now, so you could just use a switch 
statement here, and that makes the patch significantly smaller.
   
   Or you could use an enum instead of Strings. Either way, the patch becomes 
much smaller if you can keep the `CryptoTest.CRYPTO_ON_CONF` and 
`CryptoTest.CRYPTO_OFF_CONF` constants throughout.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to