diff options
Diffstat (limited to 'vespaclient-java/src/test')
-rw-r--r-- | vespaclient-java/src/test/java/com/yahoo/vespafeeder/VespaFeederTestCase.java | 6 | ||||
-rw-r--r-- | vespaclient-java/src/test/java/com/yahoo/vespaget/DocumentRetrieverTest.java | 3 |
2 files changed, 6 insertions, 3 deletions
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 950ecd799e8..7f529fb5b86 100644 --- a/vespaclient-java/src/test/java/com/yahoo/vespafeeder/VespaFeederTestCase.java +++ b/vespaclient-java/src/test/java/com/yahoo/vespafeeder/VespaFeederTestCase.java @@ -152,13 +152,14 @@ public class VespaFeederTestCase { } @Test + @SuppressWarnings("removal") // TODO: Remove on Vespa 8 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()); + assertEquals(DocumentProtocol.Priority.LOW_1, ((PutDocumentMessage)f.sessionFactory.messages.get(0)).getPriority()); // TODO: Remove on Vespa 8 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()); @@ -175,9 +176,10 @@ public class VespaFeederTestCase { assertJsonFeedState(feedFixture); } + @SuppressWarnings("removal") // TODO: Remove on Vespa 8 protected void assertJsonFeedState(FeedFixture feedFixture) { assertEquals(3, feedFixture.sessionFactory.messages.size()); - assertEquals(DocumentProtocol.Priority.LOW_1, ((PutDocumentMessage)feedFixture.sessionFactory.messages.get(0)).getPriority()); + assertEquals(DocumentProtocol.Priority.LOW_1, ((PutDocumentMessage)feedFixture.sessionFactory.messages.get(0)).getPriority()); // TODO: Remove on Vespa 8 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 098319f24dc..8d7483c2196 100644 --- a/vespaclient-java/src/test/java/com/yahoo/vespaget/DocumentRetrieverTest.java +++ b/vespaclient-java/src/test/java/com/yahoo/vespaget/DocumentRetrieverTest.java @@ -134,6 +134,7 @@ public class DocumentRetrieverTest { } @Test + @SuppressWarnings("removal") // TODO: Remove on Vespa 8 public void testSendSingleMessage() throws DocumentRetrieverException { ClientParameters params = createParameters() .setDocumentIds(asIterator(DOC_ID_1)) @@ -156,7 +157,7 @@ public class DocumentRetrieverTest { verify(mockedSession, times(1)).syncSend(argThat((ArgumentMatcher<GetDocumentMessage>) o -> o.getPriority().equals(DocumentProtocol.Priority.HIGH_1) && !o.getRetryEnabled() && - o.getLoadType().equals(new LoadType(1, "loadtype", DocumentProtocol.Priority.HIGH_1)))); + o.getLoadType().equals(new LoadType(1, "loadtype", DocumentProtocol.Priority.HIGH_1)))); // TODO: Remove on Vespa 8 assertContainsDocument(DOC_ID_1); } |