Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: validate special data in opensearch sink #3685

Conversation

chenqi0805
Copy link
Collaborator

Description

This PR validates special and extreme values in opensearch sink

Issues Resolved

Resolves #3678

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@chenqi0805 chenqi0805 marked this pull request as ready for review November 20, 2023 21:17
expectedContent.put(testField, testValue);

assertThat(retSources.size(), equalTo(1));
assertThat(retSources.containsAll(Arrays.asList(expectedContent)), equalTo(true));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you are already checking the size, you could do:

assertThat(retSources.get(0), equalTo(expectedContent));

This way, if the value is incorrect, Hamcrest will include the actual and expected in the error.

Signed-off-by: George Chen <[email protected]>
@chenqi0805 chenqi0805 requested a review from dlvenable November 21, 2023 17:39
@chenqi0805 chenqi0805 merged commit 7e5746b into opensearch-project:main Nov 27, 2023
60 of 64 checks passed
@chenqi0805 chenqi0805 deleted the tst/validate-data-opensearch-sink branch November 27, 2023 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration tests to validate data going to OpenSearch
4 participants