diff options
Diffstat (limited to 'container-search/src/test')
3 files changed, 23 insertions, 23 deletions
diff --git a/container-search/src/test/java/com/yahoo/search/grouping/request/GroupingOperationTestCase.java b/container-search/src/test/java/com/yahoo/search/grouping/request/GroupingOperationTestCase.java index cc834002fd8..1851f59c824 100644 --- a/container-search/src/test/java/com/yahoo/search/grouping/request/GroupingOperationTestCase.java +++ b/container-search/src/test/java/com/yahoo/search/grouping/request/GroupingOperationTestCase.java @@ -2,7 +2,7 @@ package com.yahoo.search.grouping.request; import com.yahoo.search.grouping.request.parser.ParseException; -import com.yahoo.search.grouping.request.parser.TokenMgrError; +import com.yahoo.search.grouping.request.parser.TokenMgrException; import org.junit.Test; import java.util.List; @@ -130,7 +130,7 @@ public class GroupingOperationTestCase { GroupingOperation.fromString("all(foo)"); fail(); } catch (IllegalArgumentException e) { - assertTrue(e.getMessage().startsWith("Encountered \"foo\" at line 1, column 5.\n")); + assertTrue(e.getMessage().startsWith("Encountered \" <IDENTIFIER> \"foo \"\" at line 1, column 5.\n")); assertTrue(e.getCause() instanceof ParseException); } } @@ -142,7 +142,7 @@ public class GroupingOperationTestCase { fail(); } catch (IllegalArgumentException e) { assertTrue(e.getMessage().startsWith("Lexical error at line 1, column 6.")); - assertTrue(e.getCause() instanceof TokenMgrError); + assertTrue(e.getCause() instanceof TokenMgrException); } } } diff --git a/container-search/src/test/java/com/yahoo/search/grouping/request/parser/GroupingParserTestCase.java b/container-search/src/test/java/com/yahoo/search/grouping/request/parser/GroupingParserTestCase.java index db1f2f59e8d..2c43873036e 100644 --- a/container-search/src/test/java/com/yahoo/search/grouping/request/parser/GroupingParserTestCase.java +++ b/container-search/src/test/java/com/yahoo/search/grouping/request/parser/GroupingParserTestCase.java @@ -167,15 +167,15 @@ public class GroupingParserTestCase { String expected = "all(group(foo) each(output(max(bar))))"; assertParse(" all(group(foo)each(output(max(bar))))", expected); - assertIllegalArgument("all (group(foo)each(output(max(bar))))", "Encountered \" \" at line 1, column 4."); + assertIllegalArgument("all (group(foo)each(output(max(bar))))", "Encountered \" <SPACE> \" \"\" at line 1, column 4."); assertParse("all( group(foo)each(output(max(bar))))", expected); - assertIllegalArgument("all(group (foo)each(output(max(bar))))", "Encountered \" \" at line 1, column 10."); + assertIllegalArgument("all(group (foo)each(output(max(bar))))", "Encountered \" <SPACE> \" \"\" at line 1, column 10."); assertParse("all(group( foo)each(output(max(bar))))", expected); assertParse("all(group(foo )each(output(max(bar))))", expected); assertParse("all(group(foo) each(output(max(bar))))", expected); - assertIllegalArgument("all(group(foo)each (output(max(bar))))", "Encountered \" \" at line 1, column 19."); + assertIllegalArgument("all(group(foo)each (output(max(bar))))", "Encountered \" <SPACE> \" \"\" at line 1, column 19."); assertParse("all(group(foo)each( output(max(bar))))", expected); - assertIllegalArgument("all(group(foo)each(output (max(bar))))", "Encountered \" \" at line 1, column 26."); + assertIllegalArgument("all(group(foo)each(output (max(bar))))", "Encountered \" <SPACE> \" \"\" at line 1, column 26."); assertParse("all(group(foo)each(output( max(bar))))", expected); assertParse("all(group(foo)each(output(max(bar))))", expected); assertParse("all(group(foo)each(output(max( bar))))", expected); @@ -333,7 +333,7 @@ public class GroupingParserTestCase { assertIllegalArgument("all(group(predefined(foo, bucket<-inf, inf>)))", "Bucket type mismatch, cannot both be infinity"); assertIllegalArgument("all(group(predefined(foo, bucket<inf, -inf>)))", - "Encountered \"inf\" at line 1, column 34."); + "Encountered \" \"inf\" \"inf \"\" at line 1, column 34."); assertIllegalArgument("all(group(predefined(foo, bucket(2, 1))))", "Bucket to-value can not be less than from-value."); @@ -342,7 +342,7 @@ public class GroupingParserTestCase { assertIllegalArgument("all(group(predefined(foo, bucket(b, a))))", "Bucket to-value can not be less than from-value."); assertIllegalArgument("all(group(predefined(foo, bucket(b, -inf))))", - "Encountered \"-inf\" at line 1, column 37."); + "Encountered \" \"-inf\" \"-inf \"\" at line 1, column 37."); assertIllegalArgument("all(group(predefined(foo, bucket(c, d), bucket(a, b))))", "Buckets must be monotonically increasing, got bucket[\"c\", \"d\"> before bucket[\"a\", \"b\">."); assertIllegalArgument("all(group(predefined(foo, bucket(c, d), bucket(-inf, e))))", @@ -386,19 +386,19 @@ public class GroupingParserTestCase { " each() as(baz))", "all(group(a) each(each() as(foo) each() as(bar)) each() as(baz))"); - assertIllegalArgument("all() as(foo)", "Encountered \"as\" at line 1, column 7."); - assertIllegalArgument("all(all() as(foo))", "Encountered \"as\" at line 1, column 11."); - assertIllegalArgument("each(all() as(foo))", "Encountered \"as\" at line 1, column 12."); + assertIllegalArgument("all() as(foo)", "Encountered \" \"as\" \"as \"\" at line 1, column 7."); + assertIllegalArgument("all(all() as(foo))", "Encountered \" \"as\" \"as \"\" at line 1, column 11."); + assertIllegalArgument("each(all() as(foo))", "Encountered \" \"as\" \"as \"\" at line 1, column 12."); } @Test public void testAttributeName() { assertParse("all(group(foo))"); assertIllegalArgument("all(group(foo.))", - "Encountered \")\" at line 1, column 15."); + "Encountered \" \")\" \") \"\" at line 1, column 15."); assertParse("all(group(foo.bar))"); assertIllegalArgument("all(group(foo.bar.))", - "Encountered \")\" at line 1, column 19."); + "Encountered \" \")\" \") \"\" at line 1, column 19."); assertParse("all(group(foo.bar.baz))"); } @@ -410,7 +410,7 @@ public class GroupingParserTestCase { "all(output(min(a) as(foo), max(b) as(bar)))"); assertIllegalArgument("all(output(min(a)) as(foo))", - "Encountered \"as\" at line 1, column 20."); + "Encountered \" \"as\" \"as \"\" at line 1, column 20."); } @Test @@ -423,11 +423,11 @@ public class GroupingParserTestCase { @Test public void testParseBadRequest() { assertIllegalArgument("output(count())", - "Encountered \"output\" at line 1, column 1."); + "Encountered \" \"output\" \"output \"\" at line 1, column 1."); assertIllegalArgument("each(output(count()))", "Expression 'count()' not applicable for single hit."); assertIllegalArgument("all(output(count())))", - "Encountered \")\" at line 1, column 21."); + "Encountered \" \")\" \") \"\" at line 1, column 21."); } @Test @@ -541,16 +541,16 @@ public class GroupingParserTestCase { assertParse("all(group(debugwait(artist, 3.3, true)))"); assertParse("all(group(debugwait(artist, 3.3, false)))"); assertIllegalArgument("all(group(debugwait(artist, -3.3, true)))", - "Encountered \"-\" at line 1, column 29"); + "Encountered \" \"-\" \"- \"\" at line 1, column 29"); assertIllegalArgument("all(group(debugwait(artist, 3.3, lol)))", - "Encountered \"lol\" at line 1, column 34"); + "Encountered \" <IDENTIFIER> \"lol \"\" at line 1, column 34"); assertParse("all(group(artist) each(output(stddev(simple))))"); } @Test public void requireThatParseExceptionMessagesContainErrorMarker() { assertIllegalArgument("foo", - "Encountered \"foo\" at line 1, column 1.\n" + + "Encountered \" <IDENTIFIER> \"foo \"\" at line 1, column 1.\n" + "Was expecting one of:\n" + " <SPACE> ...\n" + " \"all\" ...\n" + @@ -560,7 +560,7 @@ public class GroupingParserTestCase { "foo\n" + "^"); assertIllegalArgument("\n foo", - "Encountered \"foo\" at line 2, column 2.\n" + + "Encountered \" <IDENTIFIER> \"foo \"\" at line 2, column 2.\n" + "Was expecting one of:\n" + " <SPACE> ...\n" + " \"all\" ...\n" + diff --git a/container-search/src/test/java/com/yahoo/vespa/streamingvisitors/VdsStreamingSearcherTestCase.java b/container-search/src/test/java/com/yahoo/vespa/streamingvisitors/VdsStreamingSearcherTestCase.java index d767d06104c..c8c653d67ed 100644 --- a/container-search/src/test/java/com/yahoo/vespa/streamingvisitors/VdsStreamingSearcherTestCase.java +++ b/container-search/src/test/java/com/yahoo/vespa/streamingvisitors/VdsStreamingSearcherTestCase.java @@ -2,7 +2,7 @@ package com.yahoo.vespa.streamingvisitors; import com.yahoo.config.subscription.ConfigGetter; -import com.yahoo.document.select.parser.TokenMgrError; +import com.yahoo.document.select.parser.TokenMgrException; import com.yahoo.messagebus.routing.Route; import com.yahoo.prelude.fastsearch.DocumentdbInfoConfig; import com.yahoo.document.select.parser.ParseException; @@ -55,7 +55,7 @@ public class VdsStreamingSearcherTestCase { if (queryString.compareTo("parseexception") == 0) { throw new ParseException("Parsing failed"); } else if (queryString.compareTo("tokenizeexception") == 0) { - throw new TokenMgrError("Tokenization failed", 0); + throw new TokenMgrException("Tokenization failed", 0); } else if (queryString.compareTo("interruptedexception") == 0) { throw new InterruptedException("Interrupted"); } else if (queryString.compareTo("timeoutexception") == 0) { |