I could see many test cases are using the "/test" parent path. If any of these test case failed/missed to cleanup this "/test" parent path then would affect the cs.getSpaceConsumed() value.
ContentSummary cs = fs.getContentSummary(parent);
assertEquals("Bad disk space usage",
cs.getSpaceConsumed(), newLength * REPLICATION);
I think cleanup before every tests would help to resolve this case. I've updated a patch to do the cleanups. Please review. Thanks!