Stabelize more tests

This commit is contained in:
Simon Willnauer 2013-06-07 20:33:17 +02:00
parent ac75b1bcae
commit b222e83d2b
2 changed files with 4 additions and 5 deletions

View File

@ -20,6 +20,7 @@
package org.elasticsearch.test.integration.nested;
import org.apache.lucene.search.Explanation;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus;
import org.elasticsearch.action.admin.indices.status.IndicesStatusResponse;
import org.elasticsearch.action.delete.DeleteResponse;
import org.elasticsearch.action.get.GetResponse;
@ -77,6 +78,7 @@ public class SimpleNestedTests extends AbstractSharedClusterTest {
.endArray()
.endObject()).execute().actionGet();
waitForRelocation(ClusterHealthStatus.GREEN);
// flush, so we fetch it from the index (as see that we filter nested docs)
flush();
GetResponse getResponse = run(client().prepareGet("test", "type1", "1"));
@ -123,7 +125,7 @@ public class SimpleNestedTests extends AbstractSharedClusterTest {
.endObject()
.endArray()
.endObject()).execute().actionGet();
waitForRelocation(ClusterHealthStatus.GREEN);
// flush, so we fetch it from the index (as see that we filter nested docs)
flush();
statusResponse = run(client().admin().indices().prepareStatus());

View File

@ -48,11 +48,9 @@ import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.action.search.SearchPhaseExecutionException;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.ShardSearchFailure;
import org.elasticsearch.common.Priority;
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.text.Text;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.sort.SortBuilders;
@ -816,9 +814,8 @@ public class SimpleSortTests extends AbstractSharedClusterTest {
.execute().actionGet();
assertThat("Expected exception but returned with", result, nullValue());
} catch (SearchPhaseExecutionException e) {
}
ensureYellow();
SearchResponse searchResponse = client().prepareSearch()
.setQuery(matchAllQuery())
.addSort(SortBuilders.fieldSort("kkk").ignoreUnmapped(true))