opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
9.77k stars 1.82k forks source link

Fixing client:rest-high-level tests for ppc64le. #12313

Closed Sunidhi-Gaonkar1 closed 1 month ago

Sunidhi-Gaonkar1 commented 9 months ago

Describe the bug

Hi Team, I am working on validating Opensearch v2.11.1 on ppc64le, while running the testsuite the tests client:rest-high-level:integTest and client:rest-high-level:asyncIntegTest were failing due to the floating point difference between x86 and ppc64le. I had to make the following change fo get the tests passing.

diff --git a/client/rest-high-level/src/test/java/org/opensearch/client/RankEvalIT.java b/client/rest-high-level/src/test/java/org/opensearch/client/RankEvalIT.java
index 47add92ecac..ad274f24fb9 100644
--- a/client/rest-high-level/src/test/java/org/opensearch/client/RankEvalIT.java
+++ b/client/rest-high-level/src/test/java/org/opensearch/client/RankEvalIT.java
@@ -151,7 +151,7 @@ public class RankEvalIT extends OpenSearchRestHighLevelClientTestCase {
             DiscountedCumulativeGain::new,
             () -> new ExpectedReciprocalRank(1)
         );
-        double expectedScores[] = new double[] { 0.4285714285714286, 1.0, 0.75, 1.6408962261063627, 0.4407738095238095 };
+        double expectedScores[] = new double[] { 0.4285714285714286, 1.0, 0.75, 1.6408962261063629, 0.4407738095238095 };
         int i = 0;

Related component

Other

To Reproduce

  1. Build following instructions from https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md
  2. Execute test suite using ./gradlew check
  3. See error

Expected behavior

Tests should pass.

Additional Details

Host/Environment (please complete the following information):

ppc64le specific code is needed to be added here to pass this test. Please let me know how to proceed further on this. Thank you.

peternied commented 9 months ago

[Triage - attendees 1 2 3 4 5 6] @Sunidhi-Gaonkar1 Thanks for filing this issue. It would be useful if you had instructions for how to get a ppc64le environment for validating this scenario.

Sunidhi-Gaonkar1 commented 8 months ago

Hi @peternied , Apologies for the late reply. You can request for a ppc64le VM here: https://osuosl.org/services/powerdev/request_hosting/. Please let me know if you have further questions.

Sunidhi-Gaonkar1 commented 7 months ago

Hi @peternied , Following up on this, please let me know if you require any help.Thank you.

peternied commented 7 months ago

if you require any help

@Sunidhi-Gaonkar1 I triaged this issue as part of our weekly triage meetings, AFAIK there is no one that is looking into resolving issue at this time. We would welcome a pull request to address this problem - I'd be happy to review such a contribution to this project, want to make one?

Sunidhi-Gaonkar1 commented 7 months ago

Sure @peternied , will raise the PR soon.