Add missing .get() call to actually execute the update setting in RecoveryWhileUnderLoadTests
This commit is contained in:
parent
6be85cece4
commit
b0a8abeb88
|
@ -22,6 +22,7 @@ package org.elasticsearch.recovery;
|
|||
import com.google.common.base.Predicate;
|
||||
import org.apache.lucene.util.LuceneTestCase.Slow;
|
||||
import org.elasticsearch.action.admin.indices.refresh.RefreshResponse;
|
||||
import org.elasticsearch.action.admin.indices.settings.UpdateSettingsResponse;
|
||||
import org.elasticsearch.action.admin.indices.stats.IndicesStatsResponse;
|
||||
import org.elasticsearch.action.admin.indices.stats.ShardStats;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
|
@ -364,7 +365,7 @@ public class RecoveryWhileUnderLoadTests extends AbstractIntegrationTest {
|
|||
logger.info("--> indexing threads stopped");
|
||||
logger.info("--> bump up number of replicas to 1 and allow all nodes to hold the index");
|
||||
allowNodes("test", 3);
|
||||
client().admin().indices().prepareUpdateSettings("test").setSettings(ImmutableSettings.settingsBuilder().put("number_of_replicas", 1));
|
||||
assertAcked(client().admin().indices().prepareUpdateSettings("test").setSettings(ImmutableSettings.settingsBuilder().put("number_of_replicas", 1)).get());
|
||||
assertThat(client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setTimeout("1m").setWaitForGreenStatus().execute().actionGet().isTimedOut(), equalTo(false));
|
||||
|
||||
logger.info("--> refreshing the index");
|
||||
|
|
|
@ -36,6 +36,7 @@ import org.elasticsearch.action.count.CountResponse;
|
|||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.action.search.ShardSearchFailure;
|
||||
import org.elasticsearch.action.support.broadcast.BroadcastOperationResponse;
|
||||
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.io.stream.BytesStreamInput;
|
||||
import org.elasticsearch.common.io.stream.BytesStreamOutput;
|
||||
|
@ -63,6 +64,11 @@ import static org.junit.Assert.fail;
|
|||
*/
|
||||
public class ElasticsearchAssertions {
|
||||
|
||||
public static void assertAcked(AcknowledgedResponse response) {
|
||||
assertThat(response.getClass().getSimpleName() + " failed - not acked", response.isAcknowledged(), equalTo(true));
|
||||
assertVersionSerializable(response);
|
||||
}
|
||||
|
||||
public static void assertAcked(PutMappingRequestBuilder builder) {
|
||||
assertAcked(builder.get());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue