accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Medinets <>
Subject Using powermock-api-mockito in tests?
Date Thu, 21 Mar 2013 20:59:40 GMT
Is there any reason why I should not add a dependency in start/pom.xml
to powermock-api-mockito? With this library, we can mock the call to
System.getenv() which breaks the tests in AccumuloVFSClassLoaderTest.
The two tests need these four lines of setup in order to pass:

      Map<String, String> mockSystemProperties = new HashMap<String, String>();
      mockSystemProperties.put("ACCUMULO_HOME", System.getenv("HOME"));


You'll notice that set ACCUMULO_HOME is set to the value of HOME to
make the test cross-platform.

View raw message