Reduce redundancy in assert and log more information to help in debugging

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1676936 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2015-04-30 09:26:56 +00:00
parent da36d92056
commit fd769b3b7f
1 changed files with 2 additions and 5 deletions

View File

@ -1313,11 +1313,8 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
long timeTakenInSeconds = TimeUnit.SECONDS.convert(timeTaken, TimeUnit.NANOSECONDS); long timeTakenInSeconds = TimeUnit.SECONDS.convert(timeTaken, TimeUnit.NANOSECONDS);
//Let's make sure it took more than approximateTimeInSeconds to make sure that it was throttled //Let's make sure it took more than approximateTimeInSeconds to make sure that it was throttled
boolean isElapsed = false; log.info("approximateTimeInSeconds = " + approximateTimeInSeconds + " timeTakenInSeconds = " + timeTakenInSeconds);
if(timeTakenInSeconds - approximateTimeInSeconds > 0) { assertTrue(timeTakenInSeconds - approximateTimeInSeconds > 0);
isElapsed = true;
}
assertTrue(isElapsed);
} }
private class AddExtraDocs implements Runnable { private class AddExtraDocs implements Runnable {