Skip to content

Commit 0e83615

Browse files
committed
[Test] Use no failures, shard might not have been initialize yet
1 parent 08ca51d commit 0e83615

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/java/org/elasticsearch/threadpool/SimpleThreadPoolTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
5151
import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
5252
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllSuccessful;
53+
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
5354
import static org.hamcrest.Matchers.*;
5455

5556
/**
@@ -91,8 +92,8 @@ public void verifyThreadNames() throws Exception {
9192
indexRandom(true, builders);
9293
int numSearches = randomIntBetween(2, 100);
9394
for (int i = 0; i < numSearches; i++) {
94-
assertAllSuccessful(client().prepareSearch("idx").setQuery(QueryBuilders.termQuery("str_value", "s" + i)).get());
95-
assertAllSuccessful(client().prepareSearch("idx").setQuery(QueryBuilders.termQuery("l_value", i)).get());
95+
assertNoFailures(client().prepareSearch("idx").setQuery(QueryBuilders.termQuery("str_value", "s" + i)).get());
96+
assertNoFailures(client().prepareSearch("idx").setQuery(QueryBuilders.termQuery("l_value", i)).get());
9697
}
9798
Set<String> threadNames = Sets.newHashSet();
9899
for (long l : threadBean.getAllThreadIds()) {

0 commit comments

Comments
 (0)