[TEST] fix rounding issue

This commit is contained in:
Britta Weber 2014-09-09 15:33:09 +02:00
parent b0cf929637
commit 1138a6ae60
1 changed files with 4 additions and 4 deletions

View File

@ -244,13 +244,13 @@ public class FunctionScoreTests extends ElasticsearchIntegrationTest {
}
protected float computeExpectedScore(float[] weights, float[] scores, String scoreMode) {
float expectedScore = 0.0f;
protected double computeExpectedScore(float[] weights, float[] scores, String scoreMode) {
double expectedScore = 0.0;
if ("multiply".equals(scoreMode)) {
expectedScore = 1.0f;
expectedScore = 1.0;
}
if ("max".equals(scoreMode)) {
expectedScore = Float.MAX_VALUE * -1.0f;
expectedScore = Float.MAX_VALUE * -1.0;
}
if ("min".equals(scoreMode)) {
expectedScore = Float.MAX_VALUE;