From 0219ded33a9d0bfb4699127984858cbd9d2c964b Mon Sep 17 00:00:00 2001 From: Sunidhi-Gaonkar1 Date: Fri, 22 Mar 2024 18:20:47 +0530 Subject: [PATCH] Fix client-rest-high-level tests for ppc64le. Signed-off-by: Sunidhi-Gaonkar1 --- .../src/test/java/org/opensearch/client/RankEvalIT.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 47add92ecaccd..7d25a4ffb7282 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,13 @@ public void testMetrics() throws IOException { DiscountedCumulativeGain::new, () -> new ExpectedReciprocalRank(1) ); - double expectedScores[] = new double[] { 0.4285714285714286, 1.0, 0.75, 1.6408962261063627, 0.4407738095238095 }; + double expectedScores[]; + if ((System.getProperty("os.arch").equals("ppc64le"))) { + expectedScores = new double[] { 0.4285714285714286, 1.0, 0.75, 1.6408962261063629, 0.4407738095238095 }; + } else { + expectedScores = new double[] { 0.4285714285714286, 1.0, 0.75, 1.6408962261063627, 0.4407738095238095 }; + + } int i = 0; for (Supplier metricSupplier : metrics) { RankEvalSpec spec = new RankEvalSpec(specifications, metricSupplier.get());