-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fix bug "Assertion framework(Yaml Rest test): numeric comparison fails when comparing Integer vs Long (or Float vs Double)" #19376
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
base: main
Are you sure you want to change the base?
Conversation
|
❌ Gradle check result for e258963: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
Hi @sandeshkr419 |
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.
Thanks for fixing this and refactoring the code. I do have some clarifying questions.
test/framework/src/main/java/org/opensearch/test/rest/yaml/section/Assertion.java
Show resolved
Hide resolved
test/framework/src/main/java/org/opensearch/test/rest/yaml/section/OrderingAssertion.java
Outdated
Show resolved
Hide resolved
test/framework/src/main/java/org/opensearch/test/rest/yaml/section/OrderingAssertion.java
Outdated
Show resolved
Hide resolved
test/framework/src/main/java/org/opensearch/test/rest/yaml/section/OrderingAssertion.java
Outdated
Show resolved
Hide resolved
test/framework/src/main/java/org/opensearch/test/rest/yaml/section/OrderingAssertion.java
Show resolved
Hide resolved
...ramework/src/main/java/org/opensearch/test/rest/yaml/section/LessThanOrEqualToAssertion.java
Outdated
Show resolved
Hide resolved
test/framework/src/main/java/org/opensearch/test/rest/yaml/section/OrderingAssertion.java
Outdated
Show resolved
Hide resolved
|
❌ Gradle check result for 596a2b6: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
@sandeshkr419 Can you take another look at this? |
|
❌ Gradle check result for 596a2b6: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
❌ Gradle check result for 596a2b6: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
…ls when comparing Integer vs Long (or Float vs Double) Signed-off-by: Lamine Idjeraoui <[email protected]>
Signed-off-by: Lamine Idjeraoui <[email protected]>
Signed-off-by: Lamine Idjeraoui <[email protected]>
596a2b6 to
3ca23d2
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19376 +/- ##
============================================
+ Coverage 73.07% 73.16% +0.09%
- Complexity 70741 70858 +117
============================================
Files 5732 5732
Lines 324140 324140
Branches 46922 46922
============================================
+ Hits 236853 237169 +316
+ Misses 68117 67858 -259
+ Partials 19170 19113 -57 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Resolves #19323
The numerical comparison classes (gt, gte, lt and lte) share more than 90% of the code. Refactored the 4 classes by extracted the common code into a super class.
Updated the convertActualValue method to normalize mixed numeric types to a common upper type.
Check List
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.