[TEST] use assertAcked when creating indices

This commit is contained in:
Simon Willnauer 2014-04-01 16:02:30 +02:00
parent 24005b4011
commit 98aecee531
1 changed files with 5 additions and 4 deletions

View File

@ -39,6 +39,7 @@ import org.junit.AfterClass;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
@ -171,10 +172,10 @@ public class TribeTests extends ElasticsearchIntegrationTest {
@Test @Test
public void testOnConflictDrop() throws Exception { public void testOnConflictDrop() throws Exception {
logger.info("create 2 indices, test1 on t1, and test2 on t2"); logger.info("create 2 indices, test1 on t1, and test2 on t2");
cluster().client().admin().indices().prepareCreate("conflict").get(); assertAcked(cluster().client().admin().indices().prepareCreate("conflict"));
cluster2.client().admin().indices().prepareCreate("conflict").get(); assertAcked(cluster2.client().admin().indices().prepareCreate("conflict"));
cluster().client().admin().indices().prepareCreate("test1").get(); assertAcked(cluster().client().admin().indices().prepareCreate("test1"));
cluster2.client().admin().indices().prepareCreate("test2").get(); assertAcked(cluster2.client().admin().indices().prepareCreate("test2"));
setupTribeNode(ImmutableSettings.builder() setupTribeNode(ImmutableSettings.builder()
.put("tribe.on_conflict", "drop") .put("tribe.on_conflict", "drop")