Enable log4j.properties in all tests and fix hidden debug NPE #85

merged 2 commits into from Aug 1, 2012


None yet
2 participants

pbailis commented Jul 20, 2012

Currently, it appears log4j.properties is not picked up by all of the unit tests.

As an example, on trunk, edit src/java/log4j.properties:

log4j.rootLogger=DEBUG, stdout

Then run ant junit-test -Dtest.name=voldemort.server.EndToEndTest. It will pass. However, jnit-test is not currently using the log4j.properties file! If you include the log4j.properties file by applying commit 3886bb1, you will find that the test now fails.

Commit ffff0f7 added the log4j.properties file to the junit target but not junit-long or junit-test. This possibly explains some of the seemingly spurious failures we were seeing. I believe that 3886bb1 fixes this behavior by configuring log4j for all tests.

The failures (which were previously masked) are due to a NullPointerException in SocketStore introduced by commit fa3d6f6. The basic problem is that a PUT returns null, and we call (null).toString(). This means that, in trunk, enabling DEBUG logging in SocketStore will result in timeouts for PUT requests to stores where RequiredWrites is greater than 1. The one-line change in 1d9d8e8f4878a03625eba2cd2b8484eac94420bc fixes this problem.

@ghost ghost assigned zhongjiewu Jul 24, 2012

zhongjiewu added a commit that referenced this pull request Aug 1, 2012

Merge pull request #85 from pbailis/master
Enable log4j.properties in all tests and fix hidden debug NPE

@zhongjiewu zhongjiewu merged commit b8f0be4 into voldemort:master Aug 1, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment