Skip to content

Commit

Permalink
[TEST] Adjust exception type in SearchServiceTests#testWaitOnRefreshT…
Browse files Browse the repository at this point in the history
…imeout (elastic#117884)

This test has been failing due to elastic#114526, which changed the exception type to SearchTimeoutException.

Closes elastic#115935
  • Loading branch information
javanna authored Dec 3, 2024
1 parent f2addbc commit f5ff9c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ tests:
- class: org.elasticsearch.search.StressSearchServiceReaperIT
method: testStressReaper
issue: https://github.com/elastic/elasticsearch/issues/115816
- class: org.elasticsearch.search.SearchServiceTests
method: testWaitOnRefreshTimeout
issue: https://github.com/elastic/elasticsearch/issues/115935
- class: org.elasticsearch.search.SearchServiceTests
method: testParseSourceValidation
issue: https://github.com/elastic/elasticsearch/issues/115936
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import org.apache.lucene.store.AlreadyClosedException;
import org.apache.lucene.util.SetOnce;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.ElasticsearchTimeoutException;
import org.elasticsearch.TransportVersion;
import org.elasticsearch.TransportVersions;
import org.elasticsearch.action.ActionListener;
Expand Down Expand Up @@ -111,6 +110,7 @@
import org.elasticsearch.search.query.NonCountingTermQuery;
import org.elasticsearch.search.query.QuerySearchRequest;
import org.elasticsearch.search.query.QuerySearchResult;
import org.elasticsearch.search.query.SearchTimeoutException;
import org.elasticsearch.search.rank.RankBuilder;
import org.elasticsearch.search.rank.RankDoc;
import org.elasticsearch.search.rank.RankShardResult;
Expand Down Expand Up @@ -2616,7 +2616,7 @@ public void testWaitOnRefreshTimeout() {
);
service.executeQueryPhase(request, task, future);

ElasticsearchTimeoutException ex = expectThrows(ElasticsearchTimeoutException.class, future::actionGet);
SearchTimeoutException ex = expectThrows(SearchTimeoutException.class, future::actionGet);
assertThat(ex.getMessage(), containsString("Wait for seq_no [0] refreshed timed out ["));
}

Expand Down

0 comments on commit f5ff9c6

Please sign in to comment.