You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by kr...@apache.org on 2022/09/13 19:49:15 UTC

[solr] branch branch_9x updated: Increase poll time for DocExpirationUpdateProcessorFactoryTest due to slow Jenkins

This is an automated email from the ASF dual-hosted git repository.

krisden pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new 05f03ba9a80 Increase poll time for DocExpirationUpdateProcessorFactoryTest due to slow Jenkins
05f03ba9a80 is described below

commit 05f03ba9a80d936cf784b3f0a0e7e8156feef2a1
Author: Kevin Risden <kr...@apache.org>
AuthorDate: Tue Sep 13 15:42:58 2022 -0400

    Increase poll time for DocExpirationUpdateProcessorFactoryTest due to slow Jenkins
---
 .../processor/DocExpirationUpdateProcessorFactoryTest.java   | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

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.java
index 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 UpdateProcessorTest
     try {
       recorder.startRecording();
 
+      final int timeout = 30; // in seconds
+
       // more than one iter to verify it's recurring
       final int numItersToCheck = 1 + RANDOM_MULTIPLIER;
 
@@ -200,10 +202,11 @@ public class DocExpirationUpdateProcessorFactoryTest extends UpdateProcessorTest
         UpdateCommand 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 UpdateProcessorTest
         assertTrue(
             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);