summaryrefslogtreecommitdiffstats
path: root/vespaclient-java
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahooinc.com>2022-06-07 11:29:47 +0200
committergjoranv <gv@verizonmedia.com>2022-06-08 11:45:30 +0200
commit2101f960cedc06f93eff6830708276108da310b1 (patch)
treef90fcba5eed096aac7fdf10690a3041bc6dd6e1a /vespaclient-java
parent8d6f093b172ef6001d24dd39c51338b9f7943fc3 (diff)
Bump full removal of priorities to Vespa 9
Streaming search still uses this to ensure low latencies, and we don't have a replacement for priorities for this use case yet.
Diffstat (limited to 'vespaclient-java')
-rw-r--r--vespaclient-java/src/main/java/com/yahoo/vespaget/DocumentRetriever.java4
-rw-r--r--vespaclient-java/src/test/java/com/yahoo/vespafeeder/VespaFeederTestCase.java10
-rw-r--r--vespaclient-java/src/test/java/com/yahoo/vespaget/DocumentRetrieverTest.java4
3 files changed, 9 insertions, 9 deletions
diff --git a/vespaclient-java/src/main/java/com/yahoo/vespaget/DocumentRetriever.java b/vespaclient-java/src/main/java/com/yahoo/vespaget/DocumentRetriever.java
index f0f36b06f8b..91e3b5205c1 100644
--- a/vespaclient-java/src/main/java/com/yahoo/vespaget/DocumentRetriever.java
+++ b/vespaclient-java/src/main/java/com/yahoo/vespaget/DocumentRetriever.java
@@ -24,7 +24,7 @@ import java.util.Iterator;
*
* @author bjorncs
*/
-@SuppressWarnings("removal") // TODO: Remove on Vespa 8
+@SuppressWarnings("removal") // TODO: Remove on Vespa 9
public class DocumentRetriever {
private final ClusterList clusterList;
@@ -128,7 +128,7 @@ public class DocumentRetriever {
private Message createDocumentRequest(String docid) {
GetDocumentMessage msg = new GetDocumentMessage(new DocumentId(docid), params.fieldSet);
- msg.setPriority(params.priority); // TODO: Remove on Vespa 8
+ msg.setPriority(params.priority); // TODO: Remove on Vespa 9
msg.setRetryEnabled(!params.noRetry);
return msg;
}
diff --git a/vespaclient-java/src/test/java/com/yahoo/vespafeeder/VespaFeederTestCase.java b/vespaclient-java/src/test/java/com/yahoo/vespafeeder/VespaFeederTestCase.java
index 7f529fb5b86..d6e55a26a39 100644
--- a/vespaclient-java/src/test/java/com/yahoo/vespafeeder/VespaFeederTestCase.java
+++ b/vespaclient-java/src/test/java/com/yahoo/vespafeeder/VespaFeederTestCase.java
@@ -56,7 +56,7 @@ public class VespaFeederTestCase {
assertTrue(arguments.isVerbose());
assertFalse(config.createifnonexistent());
- assertEquals("LOW_1", arguments.getPriority());
+ assertEquals("LOW_1", arguments.getPriority()); // TODO remove on Vespa 9
assertEquals("benchmark", arguments.getMode());
assertEquals("foo.xml", arguments.getFiles().get(0));
assertEquals("bar.xml", arguments.getFiles().get(1));
@@ -152,14 +152,14 @@ public class VespaFeederTestCase {
}
@Test
- @SuppressWarnings("removal") // TODO: Remove on Vespa 8
+ @SuppressWarnings("removal") // TODO: Remove on Vespa 9
public void feedFile() throws Exception {
FeedFixture f = new FeedFixture();
Arguments arguments = new Arguments("--file src/test/files/myfeed.xml --priority LOW_1".split(" "), f.sessionFactory);
new VespaFeeder(arguments, f.typeManager).parseFiles(System.in, f.printStream);
assertEquals(3, f.sessionFactory.messages.size());
- assertEquals(DocumentProtocol.Priority.LOW_1, ((PutDocumentMessage)f.sessionFactory.messages.get(0)).getPriority()); // TODO: Remove on Vespa 8
+ assertEquals(DocumentProtocol.Priority.LOW_1, ((PutDocumentMessage)f.sessionFactory.messages.get(0)).getPriority()); // TODO: Remove on Vespa 9
assertEquals("id:test:news::foo", ((PutDocumentMessage) f.sessionFactory.messages.get(0)).getDocumentPut().getDocument().getId().toString());
DocumentUpdate update = ((UpdateDocumentMessage) f.sessionFactory.messages.get(1)).getDocumentUpdate();
assertEquals("id:test:news::foo", update.getId().toString());
@@ -176,10 +176,10 @@ public class VespaFeederTestCase {
assertJsonFeedState(feedFixture);
}
- @SuppressWarnings("removal") // TODO: Remove on Vespa 8
+ @SuppressWarnings("removal") // TODO: Remove on Vespa 9
protected void assertJsonFeedState(FeedFixture feedFixture) {
assertEquals(3, feedFixture.sessionFactory.messages.size());
- assertEquals(DocumentProtocol.Priority.LOW_1, ((PutDocumentMessage)feedFixture.sessionFactory.messages.get(0)).getPriority()); // TODO: Remove on Vespa 8
+ assertEquals(DocumentProtocol.Priority.LOW_1, ((PutDocumentMessage)feedFixture.sessionFactory.messages.get(0)).getPriority()); // TODO: Remove on Vespa 9
assertEquals("id:test:news::foo", ((PutDocumentMessage) feedFixture.sessionFactory.messages.get(0)).getDocumentPut().getDocument().getId().toString());
DocumentUpdate update = ((UpdateDocumentMessage) feedFixture.sessionFactory.messages.get(1)).getDocumentUpdate();
assertEquals("id:test:news::foo", update.getId().toString());
diff --git a/vespaclient-java/src/test/java/com/yahoo/vespaget/DocumentRetrieverTest.java b/vespaclient-java/src/test/java/com/yahoo/vespaget/DocumentRetrieverTest.java
index 5ded5ff524b..ce555e2c0f5 100644
--- a/vespaclient-java/src/test/java/com/yahoo/vespaget/DocumentRetrieverTest.java
+++ b/vespaclient-java/src/test/java/com/yahoo/vespaget/DocumentRetrieverTest.java
@@ -130,7 +130,7 @@ public class DocumentRetrieverTest {
}
@Test
- @SuppressWarnings("removal") // TODO: Remove on Vespa 8
+ @SuppressWarnings("removal") // TODO: Remove on Vespa 9
public void testSendSingleMessage() throws DocumentRetrieverException {
ClientParameters params = createParameters()
.setDocumentIds(asIterator(DOC_ID_1))
@@ -147,7 +147,7 @@ public class DocumentRetrieverTest {
documentRetriever.retrieveDocuments();
verify(mockedSession, times(1)).syncSend(argThat((ArgumentMatcher<GetDocumentMessage>) o ->
- o.getPriority().equals(DocumentProtocol.Priority.HIGH_1) &&
+ o.getPriority().equals(DocumentProtocol.Priority.HIGH_1) && // TODO remove on Vespa 9
!o.getRetryEnabled()));
assertContainsDocument(DOC_ID_1);
}