-
Notifications
You must be signed in to change notification settings - Fork 134
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
[Tests] IT tests and test utils update to fix failing tests for serverless #2902
Conversation
a1f9746
to
d82c6a0
Compare
integ-test/src/test/java/org/opensearch/sql/legacy/CsvFormatResponseIT.java
Outdated
Show resolved
Hide resolved
integ-test/src/test/java/org/opensearch/sql/util/TestUtils.java
Outdated
Show resolved
Hide resolved
integ-test/src/test/java/org/opensearch/sql/ppl/DedupCommandIT.java
Outdated
Show resolved
Hide resolved
d82c6a0
to
2881b6b
Compare
integ-test/src/test/java/org/opensearch/sql/legacy/CsvFormatResponseIT.java
Show resolved
Hide resolved
integ-test/src/test/java/org/opensearch/sql/ppl/DedupCommandIT.java
Outdated
Show resolved
Hide resolved
integ-test/src/test/java/org/opensearch/sql/ppl/ParseCommandIT.java
Outdated
Show resolved
Hide resolved
integ-test/src/test/java/org/opensearch/sql/sql/ConditionalIT.java
Outdated
Show resolved
Hide resolved
integ-test/src/test/java/org/opensearch/sql/ppl/SortCommandIT.java
Outdated
Show resolved
Hide resolved
integ-test/src/test/java/org/opensearch/sql/legacy/CsvFormatResponseIT.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
// Verify consecutive deduplication and create the expected rows | ||
private List<Object[]> getExpectedDedupRows(List<Object[]> actualRows) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not quite sure about this..
is the data rows for dedup test case not being sorted causing failure in IT? because this seems like actual coding logic for dedup, instead of providing pre-validated expected value (like the original verifyDataRows(result, rows(true), rows(false), rows(true), rows(false))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No the failure was not because of the sorted value but the size of the data rows in the responses. Here we were hardcoding the expected response to be of size 4 but different data sources having different number of rows even though are de-duplicated, due to this hard coded check tests would fail. So instead of hard coding assertions, we can check the deduplication of the rows based on the response data.
…rless Signed-off-by: Manasvini B S <manasvis@amazon.com>
2881b6b
to
8ba5917
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2902 +/- ##
=========================================
Coverage 94.50% 94.50%
Complexity 5235 5235
=========================================
Files 515 515
Lines 14791 14791
Branches 978 978
=========================================
Hits 13978 13978
Misses 772 772
Partials 41 41
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/sql/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/sql/backport-2.x
# Create a new branch
git switch --create backport/backport-2902-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 6972487e855599745df909292d699d37f82282c7
# Push it to GitHub
git push --set-upstream origin backport/backport-2902-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/sql/backport-2.x Then, create a pull request where the |
…rless (opensearch-project#2902) Signed-off-by: Manasvini B S <manasvis@amazon.com>
…rless (opensearch-project#2902) Signed-off-by: Manasvini B S <manasvis@amazon.com>
Description
Some of the IT tests are failing in serverless even though data exist and functionality working as expected. RCA for such failures are sharding differences between data sources Leading to different ranking and different order in the schema fields in the response.
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
--signoff
.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.