ThreadPool.EstimatedTimeThread should be set on initialization
Some tests run before the thread is started and thus use 0 as a the current time, which later on leads to big time jumps and thus failures. Ex. InternalEngineTests.testVersioningReplicaConflict2
This commit is contained in:
parent
b2db7c8222
commit
870bd90f54
|
@ -27,7 +27,6 @@ import org.elasticsearch.ElasticsearchIllegalArgumentException;
|
|||
import org.elasticsearch.common.Nullable;
|
||||
import org.elasticsearch.common.component.AbstractComponent;
|
||||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.io.FileSystemUtils;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
|
@ -501,6 +500,7 @@ public class ThreadPool extends AbstractComponent {
|
|||
EstimatedTimeThread(String name, long interval) {
|
||||
super(name);
|
||||
this.interval = interval;
|
||||
this.estimatedTimeInMillis = System.currentTimeMillis();
|
||||
setDaemon(true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue