summaryrefslogtreecommitdiffstats
path: root/vespaclient-container-plugin/src/test/java/com/yahoo/feedhandler/VespaFeedHandlerTestCase.java
diff options
context:
space:
mode:
Diffstat (limited to 'vespaclient-container-plugin/src/test/java/com/yahoo/feedhandler/VespaFeedHandlerTestCase.java')
-rwxr-xr-xvespaclient-container-plugin/src/test/java/com/yahoo/feedhandler/VespaFeedHandlerTestCase.java50
1 files changed, 49 insertions, 1 deletions
diff --git a/vespaclient-container-plugin/src/test/java/com/yahoo/feedhandler/VespaFeedHandlerTestCase.java b/vespaclient-container-plugin/src/test/java/com/yahoo/feedhandler/VespaFeedHandlerTestCase.java
index 823f4b6f568..d1ed02209b2 100755
--- a/vespaclient-container-plugin/src/test/java/com/yahoo/feedhandler/VespaFeedHandlerTestCase.java
+++ b/vespaclient-container-plugin/src/test/java/com/yahoo/feedhandler/VespaFeedHandlerTestCase.java
@@ -640,7 +640,7 @@ public class VespaFeedHandlerTestCase {
@Test
public void testOverrides() throws Exception {
setup(null);
- Result res = testFeed(xmlFilesPath + "test10b.xml", "feed?timeout=2.222&route=storage&priority=HIGH_2");
+ Result res = testFeed(xmlFilesPath + "test10b.xml", "feed?timeout=2.222&route=storage&priority=HIGH_2&totaltimeout=-1");
assertEquals(2, res.messages.size());
@@ -652,6 +652,54 @@ public class VespaFeedHandlerTestCase {
}
@Test
+ public void testTimeoutWithNoUpperBound() throws Exception {
+ setup(null);
+ Result res = testFeed(xmlFilesPath + "test10b.xml", "feed?timeout=2.222&totaltimeout=-1");
+
+ assertEquals(2, res.messages.size());
+
+ for (Message m : res.messages) {
+ assertEquals(2222, m.getTimeRemaining());
+ }
+ }
+
+ @Test
+ public void testTimeout() throws Exception {
+ setup(null);
+ Result res = testFeed(xmlFilesPath + "test10b.xml", "feed?timeout=2.222");
+
+ assertEquals(2, res.messages.size());
+
+ for (Message m : res.messages) {
+ assertTrue(2222 >= m.getTimeRemaining());
+ }
+ }
+
+ @Test
+ public void testTotalTimeout() throws Exception {
+ setup(null);
+ Result res = testFeed(xmlFilesPath + "test10b.xml", "feed?totaltimeout=2.222");
+
+ assertEquals(2, res.messages.size());
+
+ for (Message m : res.messages) {
+ assertTrue(2222 >= m.getTimeRemaining());
+ }
+ }
+
+ @Test
+ public void testTotalTimeoutAndNormalTimeout() throws Exception {
+ setup(null);
+ Result res = testFeed(xmlFilesPath + "test10b.xml", "feed?totaltimeout=1000&timeout=2.222");
+
+ assertEquals(2, res.messages.size());
+
+ for (Message m : res.messages) {
+ assertEquals(2222, m.getTimeRemaining());
+ }
+ }
+
+ @Test
public void testBogusPriority() throws Exception {
try {
setup(null);