[TEST] Wait for green until testing Version.FORCE

This commit is contained in:
Simon Willnauer 2015-05-19 15:32:21 +02:00
parent fae1a0731f
commit 348e14fa85
2 changed files with 1 additions and 2 deletions

View File

@ -114,7 +114,6 @@ public class CorruptedFileTest extends ElasticsearchIntegrationTest {
* Tests that we can actually recover from a corruption on the primary given that we have replica shards around.
*/
@Test
@TestLogging("indices.recovery:TRACE")
public void testCorruptFileAndRecover() throws ExecutionException, InterruptedException, IOException {
int numDocs = scaledRandomIntBetween(100, 1000);
// have enough space for 3 copies

View File

@ -81,7 +81,7 @@ public class SimpleVersioningTests extends ElasticsearchIntegrationTest {
@Test
public void testForce() throws Exception {
createIndex("test");
ensureGreen("test"); // we are testing force here which doesn't work if we are recovering at the same time - zzzzz...
IndexResponse indexResponse = client().prepareIndex("test", "type", "1").setSource("field1", "value1_1").setVersion(12).setVersionType(VersionType.FORCE).get();
assertThat(indexResponse.getVersion(), equalTo(12l));