Skip to content

Commit

Permalink
Fix test EsqlNodeFailureIT - use correct exception class (elastic#119326
Browse files Browse the repository at this point in the history
)
  • Loading branch information
smalyshev authored Dec 27, 2024
1 parent c0553d4 commit 1632929
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

package org.elasticsearch.xpack.esql.action;

import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.common.util.CollectionUtils;
import org.elasticsearch.plugins.Plugin;
Expand Down Expand Up @@ -58,7 +57,7 @@ public void testFailureLoadingFields() throws IOException {
docs.add(client().prepareIndex("fail").setSource("foo", 0));
indexRandom(true, docs);

ElasticsearchException e = expectThrows(ElasticsearchException.class, () -> run("FROM fail,ok | LIMIT 100").close());
IllegalStateException e = expectThrows(IllegalStateException.class, () -> run("FROM fail,ok | LIMIT 100").close());
assertThat(e.getMessage(), equalTo("Accessing failing field"));
}
}

0 comments on commit 1632929

Please sign in to comment.