diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2018-10-07 22:16:28 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2018-10-07 22:16:28 +0200 |
commit | 8dd6d260b3dcdf3d4b4f7c61ce49b9a2157e6a66 (patch) | |
tree | a90e7093a221ae21f3b7766619ff09a6d8a08d81 /container-search/src/test/java/com/yahoo/vespa | |
parent | 0e7684e9dc6164def15c6df6a331c2f1e7a48937 (diff) |
Also handle the case of empty selection string which evidently matches everything.
Diffstat (limited to 'container-search/src/test/java/com/yahoo/vespa')
-rw-r--r-- | container-search/src/test/java/com/yahoo/vespa/streamingvisitors/VdsVisitorTestCase.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/container-search/src/test/java/com/yahoo/vespa/streamingvisitors/VdsVisitorTestCase.java b/container-search/src/test/java/com/yahoo/vespa/streamingvisitors/VdsVisitorTestCase.java index c84088a19bb..11862d84414 100644 --- a/container-search/src/test/java/com/yahoo/vespa/streamingvisitors/VdsVisitorTestCase.java +++ b/container-search/src/test/java/com/yahoo/vespa/streamingvisitors/VdsVisitorTestCase.java @@ -232,7 +232,11 @@ public class VdsVisitorTestCase { } else if (qa.groupName != null) { assertEquals(docType + " and id.group==\""+qa.groupName+"\"", params.getDocumentSelection()); } else if (qa.selection != null) { - assertEquals(docType + " and " +qa.selection, params.getDocumentSelection()); + if (qa.selection.isEmpty()) { + assertEquals(docType, params.getDocumentSelection()); + } else { + assertEquals(docType + " and " + qa.selection, params.getDocumentSelection()); + } } else { assertEquals("", params.getDocumentSelection()); } @@ -383,6 +387,9 @@ public class VdsVisitorTestCase { qa.maxBucketsPerVisitor = 0; qa.loadTypeName = null; // default loadTypeName, non-default priority verifyVisitorOk(factory, qa, route, searchCluster); + qa.selection = ""; + + verifyVisitorOk(factory, qa, route, searchCluster); // Userdoc and lots of non-default parameters qa.setNonDefaults(); |