mirror of https://github.com/apache/lucene.git
SOLR-9236: Don't use System.currentTimeMillis.
This commit is contained in:
parent
e91863b8e1
commit
b0386f0d64
|
@ -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("*:*");
|
||||
|
|
Loading…
Reference in New Issue