summaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionValidationTestCase.java
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-09-18 13:38:38 -0700
committerGitHub <noreply@github.com>2018-09-18 13:38:38 -0700
commitb38fc011d4a5cdcdbdb5d71ca77252502957fa92 (patch)
treee5a20afb500270aac9e4476ab96d60329af99574 /config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionValidationTestCase.java
parent04a2bea1982819f1e250dfc40b7fbff3fcfe303b (diff)
parent1c37f6a5646d991de68759f2312164799a89ccaa (diff)
Merge pull request #6992 from vespa-engine/bratseth/rank-type-information
Bratseth/rank type information
Diffstat (limited to 'config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionValidationTestCase.java')
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionValidationTestCase.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionValidationTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionValidationTestCase.java
index 3fe3a7c3de1..5e649c2e551 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionValidationTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionValidationTestCase.java
@@ -5,9 +5,11 @@ import com.yahoo.search.query.profile.QueryProfileRegistry;
import com.yahoo.searchdefinition.derived.DerivedConfiguration;
import com.yahoo.searchdefinition.parser.ParseException;
import com.yahoo.searchlib.rankingexpression.integration.ml.ImportedModels;
+import com.yahoo.yolean.Exceptions;
import org.junit.Ignore;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
/**
@@ -29,9 +31,7 @@ public class RankingExpressionValidationTestCase extends SearchDefinitionTestCas
fail("No exception on incorrect ranking expression " + expression);
} catch (IllegalArgumentException e) {
// Success
- // TODO: Where's the "com.yahoo.searchdefinition.parser.ParseException:" nonsense coming from?
- assertTrue("Got unexpected error message: " + e.getCause().getMessage(),
- e.getCause().getMessage().startsWith("com.yahoo.searchdefinition.parser.ParseException: Could not parse ranking expression '" + expression + "'"));
+ assertTrue(Exceptions.toMessageString(e).startsWith("Illegal first phase ranking function: Could not parse ranking expression '" + expression + "' in default, firstphase.:"));
}
}