* For the issue in #43086 we were running into inactive shards because the random timestamps previously used would randomly make `org.elasticsearch.index.shard.IndexShard#checkIdle` see an incorrect+huge inactive time * Also fixed one other spot in tests that passed `ms` instead of `ns` for the same timestamp on an index op to correctly use relative `ns` * Closes #43086
This commit is contained in:
parent
21e74dd7d2
commit
7d1983a7e3
|
@ -835,7 +835,7 @@ public abstract class EngineTestCase extends ESTestCase {
|
||||||
final Engine.Operation.TYPE opType = randomFrom(Engine.Operation.TYPE.values());
|
final Engine.Operation.TYPE opType = randomFrom(Engine.Operation.TYPE.values());
|
||||||
final boolean isNestedDoc = includeNestedDocs && opType == Engine.Operation.TYPE.INDEX && randomBoolean();
|
final boolean isNestedDoc = includeNestedDocs && opType == Engine.Operation.TYPE.INDEX && randomBoolean();
|
||||||
final int nestedValues = between(0, 3);
|
final int nestedValues = between(0, 3);
|
||||||
final long startTime = threadPool.relativeTimeInMillis();
|
final long startTime = threadPool.relativeTimeInNanos();
|
||||||
final int copies = allowDuplicate && rarely() ? between(2, 4) : 1;
|
final int copies = allowDuplicate && rarely() ? between(2, 4) : 1;
|
||||||
for (int copy = 0; copy < copies; copy++) {
|
for (int copy = 0; copy < copies; copy++) {
|
||||||
final ParsedDocument doc = isNestedDoc ? nestedParsedDocFactory.apply(id, nestedValues) : createParsedDoc(id, null);
|
final ParsedDocument doc = isNestedDoc ? nestedParsedDocFactory.apply(id, nestedValues) : createParsedDoc(id, null);
|
||||||
|
|
Loading…
Reference in New Issue