Skip to content

Commit

Permalink
Fixing integration tests (opensearch-project#375)
Browse files Browse the repository at this point in the history
* Fixing integration tests

Signed-off-by: Vacha Shah <[email protected]>

* Updating the test with a non-exact check

Signed-off-by: Vacha Shah <[email protected]>

---------

Signed-off-by: Vacha Shah <[email protected]>
  • Loading branch information
VachaShah authored Feb 28, 2023
1 parent 99d0e6a commit 701ba47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Prevent SPI calls at runtime ([#293](https://github.com/opensearch-project/opensearch-java/pull/293))
- Add support for OpenSearch Serverless ([#339](https://github.com/opensearch-project/opensearch-java/pull/339))
- Fix issue where completion suggestions were failing, due to being parsed as term suggestions ([#107](https://github.com/opensearch-project/opensearch-java/issues/107))
- Fix integration tests ([#375](https://github.com/opensearch-project/opensearch-java/pull/375))

### Deprecated

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import static java.util.Collections.emptyMap;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
import static org.junit.Assert.assertTrue;

public abstract class AbstractClusterClientIT extends OpenSearchJavaClientTestCase {
public void testClusterPutSettings() throws IOException {
Expand Down Expand Up @@ -95,11 +96,7 @@ public void testClusterUpdateSettingNonExistent() throws IOException {
} catch (OpenSearchException e) {
assertNotNull(e);
assertEquals(e.response().status(), 400);
assertEquals(
e.getMessage(),
"Request failed: [illegal_argument_exception] " +
"transient setting [no_idea_what_you_are_talking_about], not recognized"
);
assertTrue(e.getMessage().contains("transient setting [no_idea_what_you_are_talking_about], not recognized"));
}
}

Expand Down

0 comments on commit 701ba47

Please sign in to comment.