mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 15:17:30 -04:00
[TEST] CCSDuelIT to not check successful shards (#75062)
CCSDuelIT sometimes fails due to an unexpected number of shards returned in the refresh response. We create an index with a certain number of shards and no replicas, and sometimes the number of shards refresh is higher by one than the shards we created. This is not symptom of a problem though, as we are checking that there are no failures, but rather indicates a relocation happening, during which both copies of the same shard have been refreshed. Closes #61258 Closes #72637 Closes #67754
This commit is contained in:
parent
49a57eed42
commit
623044ed70
1 changed files with 3 additions and 2 deletions
|
@ -10,6 +10,7 @@ package org.elasticsearch.search;
|
|||
|
||||
import com.carrotsearch.randomizedtesting.RandomizedContext;
|
||||
import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
|
||||
|
||||
import org.apache.lucene.search.join.ScoreMode;
|
||||
import org.apache.lucene.util.TimeUnits;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
|
@ -74,6 +75,7 @@ import org.elasticsearch.search.suggest.phrase.PhraseSuggestionBuilder;
|
|||
import org.elasticsearch.search.suggest.term.TermSuggestion;
|
||||
import org.elasticsearch.search.suggest.term.TermSuggestionBuilder;
|
||||
import org.elasticsearch.test.NotEqualMessageBuilder;
|
||||
import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
|
||||
import org.elasticsearch.test.rest.ESRestTestCase;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Before;
|
||||
|
@ -206,8 +208,7 @@ public class CCSDuelIT extends ESRestTestCase {
|
|||
assertTrue(bulkProcessor.awaitClose(30, TimeUnit.SECONDS));
|
||||
|
||||
RefreshResponse refreshResponse = restHighLevelClient.indices().refresh(new RefreshRequest(INDEX_NAME), RequestOptions.DEFAULT);
|
||||
assertEquals(0, refreshResponse.getFailedShards());
|
||||
assertEquals(numShards, refreshResponse.getSuccessfulShards());
|
||||
ElasticsearchAssertions.assertNoFailures(refreshResponse);
|
||||
}
|
||||
|
||||
private static IndexRequest buildIndexRequest(String id, String type, String questionId) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue