mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-18 19:05:06 +00:00
test: Index more docs, so that it is less likely the search request
does not time out. Closes #29221
This commit is contained in:
parent
067fbb8ecd
commit
fac009630d
@ -21,15 +21,12 @@ package org.elasticsearch.search;
|
||||
|
||||
import org.elasticsearch.ElasticsearchException;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.action.search.SearchType;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.script.MockScriptPlugin;
|
||||
import org.elasticsearch.script.Script;
|
||||
import org.elasticsearch.script.ScriptType;
|
||||
import org.elasticsearch.search.aggregations.AggregatorFactories;
|
||||
import org.elasticsearch.search.query.QueryPhaseExecutionException;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
|
||||
import java.util.Collection;
|
||||
@ -57,7 +54,10 @@ public class SearchTimeoutIT extends ESIntegTestCase {
|
||||
}
|
||||
|
||||
public void testSimpleTimeout() throws Exception {
|
||||
client().prepareIndex("test", "type", "1").setSource("field", "value").setRefreshPolicy(IMMEDIATE).get();
|
||||
for (int i = 0; i < 32; i++) {
|
||||
client().prepareIndex("test", "type", Integer.toString(i)).setSource("field", "value").get();
|
||||
}
|
||||
refresh("test");
|
||||
|
||||
SearchResponse searchResponse = client().prepareSearch("test").setTimeout(new TimeValue(10, TimeUnit.MILLISECONDS))
|
||||
.setQuery(scriptQuery(
|
||||
|
Loading…
x
Reference in New Issue
Block a user