[TEST] Fix the throttle test.

This commit is contained in:
Brian Murphy 2014-11-04 12:36:52 +00:00
parent 8997dba52f
commit 792b25e857
1 changed files with 3 additions and 2 deletions

View File

@ -321,7 +321,6 @@ public class IndexStatsTests extends ElasticsearchIntegrationTest {
} }
@Test @Test
@LuceneTestCase.AwaitsFix(bugUrl = "This test intermittently fails with no throttling happening.")
public void throttleStats() throws Exception { public void throttleStats() throws Exception {
assertAcked(prepareCreate("test") assertAcked(prepareCreate("test")
.setSettings(ImmutableSettings.builder() .setSettings(ImmutableSettings.builder()
@ -363,7 +362,9 @@ public class IndexStatsTests extends ElasticsearchIntegrationTest {
} }
} }
stats = client().admin().indices().prepareStats().execute().actionGet(); stats = client().admin().indices().prepareStats().execute().actionGet();
assertThat(stats.getPrimaries().getIndexing().getTotal().getThrottleTimeInMillis(), greaterThan(0l)); if (done) {
assertThat(stats.getPrimaries().getIndexing().getTotal().getThrottleTimeInMillis(), greaterThan(0l));
}
} }
@Test @Test