Fix IndexServiceTests sort field test cases#18352
Fix IndexServiceTests sort field test cases#18352andrross merged 1 commit intoopensearch-project:mainfrom
Conversation
As far as I can tell these test cases have never been working as intended. They appear to have been created as a copy-paste error from `testIllegalFsyncInterval`. They passed because the createIndex call was failing due to setting the translog sync interval to an invalid value, which is what the try-catch was expecting. After removing the invalid setting the tests did not work properly for multiple reasons. I believe I have fixed the tests back to the original intent. The reason for digging into this test was to remove the deprecated `createIndex` calls from OpenSearchSingleNodeTestCase which take the now removed type parameter. I will follow up with a separate PR to do that work, as this was a significant enough change to stand on its own. Signed-off-by: Andrew Ross <andrross@amazon.com>
|
For anyone interesting, the problems I encountered were:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #18352 +/- ##
============================================
+ Coverage 72.53% 72.60% +0.07%
- Complexity 67396 67449 +53
============================================
Files 5492 5492
Lines 311127 311127
Branches 45224 45224
============================================
+ Hits 225680 225907 +227
+ Misses 67063 66818 -245
- Partials 18384 18402 +18 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
these are good catch @andrross |
I'm wondering if they are working as expected at other places like - |
@rishabhmaurya I don't think that's a problem because the create index call will fail if you try to set a private setting without overriding the behavior. In this case the create index call was failing due to an invalid translog sync interval setting so it never got to the part where it would validate private settings. |
As far as I can tell these test cases have never been working as intended. They appear to have been created as a copy-paste error from `testIllegalFsyncInterval`. They passed because the createIndex call was failing due to setting the translog sync interval to an invalid value, which is what the try-catch was expecting. After removing the invalid setting the tests did not work properly for multiple reasons. I believe I have fixed the tests back to the original intent. The reason for digging into this test was to remove the deprecated `createIndex` calls from OpenSearchSingleNodeTestCase which take the now removed type parameter. I will follow up with a separate PR to do that work, as this was a significant enough change to stand on its own. Signed-off-by: Andrew Ross <andrross@amazon.com>
As far as I can tell these test cases have never been working as intended. They appear to have been created as a copy-paste error from `testIllegalFsyncInterval`. They passed because the createIndex call was failing due to setting the translog sync interval to an invalid value, which is what the try-catch was expecting. After removing the invalid setting the tests did not work properly for multiple reasons. I believe I have fixed the tests back to the original intent. The reason for digging into this test was to remove the deprecated `createIndex` calls from OpenSearchSingleNodeTestCase which take the now removed type parameter. I will follow up with a separate PR to do that work, as this was a significant enough change to stand on its own. Signed-off-by: Andrew Ross <andrross@amazon.com>
As far as I can tell these test cases have never been working as intended. They appear to have been created as a copy-paste error from `testIllegalFsyncInterval`. They passed because the createIndex call was failing due to setting the translog sync interval to an invalid value, which is what the try-catch was expecting. After removing the invalid setting the tests did not work properly for multiple reasons. I believe I have fixed the tests back to the original intent. The reason for digging into this test was to remove the deprecated `createIndex` calls from OpenSearchSingleNodeTestCase which take the now removed type parameter. I will follow up with a separate PR to do that work, as this was a significant enough change to stand on its own. Signed-off-by: Andrew Ross <andrross@amazon.com>
As far as I can tell these test cases have never been working as intended. They appear to have been created as a copy-paste error from `testIllegalFsyncInterval`. They passed because the createIndex call was failing due to setting the translog sync interval to an invalid value, which is what the try-catch was expecting. After removing the invalid setting the tests did not work properly for multiple reasons. I believe I have fixed the tests back to the original intent. The reason for digging into this test was to remove the deprecated `createIndex` calls from OpenSearchSingleNodeTestCase which take the now removed type parameter. I will follow up with a separate PR to do that work, as this was a significant enough change to stand on its own. Signed-off-by: Andrew Ross <andrross@amazon.com>Signed-off-by: TJ Neuenfeldt <tjneu@amazon.com>
As far as I can tell these test cases have never been working as intended. They appear to have been created as a copy-paste error from `testIllegalFsyncInterval`. They passed because the createIndex call was failing due to setting the translog sync interval to an invalid value, which is what the try-catch was expecting. After removing the invalid setting the tests did not work properly for multiple reasons. I believe I have fixed the tests back to the original intent. The reason for digging into this test was to remove the deprecated `createIndex` calls from OpenSearchSingleNodeTestCase which take the now removed type parameter. I will follow up with a separate PR to do that work, as this was a significant enough change to stand on its own. Signed-off-by: Andrew Ross <andrross@amazon.com>
As far as I can tell these test cases have never been working as intended. They appear to have been created as a copy-paste error from
testIllegalFsyncInterval. They passed because the createIndex call was failing due to setting the translog sync interval to an invalid value, which is what the try-catch was expecting. After removing the invalid setting the tests did not work properly for multiple reasons. I believe I have fixed the tests back to the original intent.The reason for digging into this test was to remove the deprecated
createIndexcalls from OpenSearchSingleNodeTestCase which take the now removed type parameter. I will follow up with a separate PR to do that work, as this was a significant enough change to stand on its own.Related Issues
Related to #10045
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.