SOLR-9236: Don't use System.currentTimeMillis.

This commit is contained in:
markrmiller 2016-07-07 20:31:53 -04:00
parent e91863b8e1
commit b0386f0d64
1 changed files with 2 additions and 2 deletions

View File

@ -314,11 +314,11 @@ public class SharedFSAutoReplicaFailoverTest extends AbstractFullDistribZkTestBa
private void queryAndAssertResultSize(String collection, int expectedResultSize, int timeoutMS)
throws SolrServerException, IOException, InterruptedException {
long startTimestamp = System.currentTimeMillis();
long startTimestamp = System.nanoTime();
long actualResultSize = 0;
while(true) {
if (System.currentTimeMillis() - startTimestamp > timeoutMS || actualResultSize > expectedResultSize) {
if (System.nanoTime() - startTimestamp > TimeUnit.MILLISECONDS.toNanos(timeoutMS) || actualResultSize > expectedResultSize) {
fail("expected: " + expectedResultSize + ", actual: " + actualResultSize);
}
SolrParams queryAll = new SolrQuery("*:*");