Apache Solr open-source search software
Increase poll time for DocExpirationUpdateProcessorFactoryTest due to slow Jenkins
Kevin Risdene087cf2b7f30
diff --git a/solr/core/src/test/org/apache/solr/update/processor/DocExpirationUpdateProcessorFactoryTest.java b/solr/core/src/test/org/apache/solr/update/processor/DocExpirationUpdateProcessorFactoryTest.javaindex ee22ee84b30..f26dbcb5ddd 100644--- a/solr/core/src/test/org/apache/solr/update/processor/DocExpirationUpdateProcessorFactoryTest.java+++ b/solr/core/src/test/org/apache/solr/update/processor/DocExpirationUpdateProcessorFactoryTest.java@@ -193,6 +193,8 @@ public class DocExpirationUpdateProcessorFactoryTest extends UpdateProcessorTesttry {recorder.startRecording();+ final int timeout = 30; // in seconds+// more than one iter to verify it's recurringfinal int numItersToCheck = 1 + RANDOM_MULTIPLIER;@@ -200,10 +202,11 @@ public class DocExpirationUpdateProcessorFactoryTest extends UpdateProcessorTestUpdateCommand tmp;// be generous in how long we wait, some jenkins machines are slooooow- tmp = recorder.commandQueue.poll(30, TimeUnit.SECONDS);+ tmp = recorder.commandQueue.poll(timeout, TimeUnit.SECONDS);+ assertNotNull("Unable to get UpdateCommand from queue within " + timeout + " seconds", tmp);// we can be confident in the order because DocExpirationUpdateProcessorFactory- // uses the same request for both the delete & the commit operations -- and both+ // uses the same request for both delete & commit operations -- and both// RecordingUpdateProcessorFactory's getInstance & startRecording methods are// synchronized. So it should not be possible to start recording in the// middle of the two commands@@ -216,8 +219,11 @@ public class DocExpirationUpdateProcessorFactoryTest extends UpdateProcessorTestassertTrue(delete.getQuery(), delete.getQuery().startsWith("{!cache=false}eXpField_tdt:[* TO "));+ // be generous in how long we wait, some jenkins machines are slooooow+ tmp = recorder.commandQueue.poll(timeout, TimeUnit.SECONDS);+ assertNotNull("Unable to get UpdateCommand from queue within " + timeout + " seconds", tmp);+// commit should be immediately after the delete operation- tmp = recorder.commandQueue.poll(5, TimeUnit.SECONDS);assertTrue("expected CommitUpdateCommand: " + tmp.getClass(), tmp instanceof CommitUpdateCommand);