From b9446d59c598a88c5149845b5a654a2dd0b7ff1b Mon Sep 17 00:00:00 2001 From: James Maes Date: Tue, 6 Oct 2026 18:04:37 -0500 Subject: [PATCH 1/2] fix(#17): log count failures instead of swallowing them Both safeCount helpers (BasepullIndexStep and ReconcileIndexStep, which FullReindexStep also uses) now log a WARN with the exception and tableName before returning null, so a failing document count is visible while the run behaves as before. Closes #17 --- .../processes/BasepullIndexStep.java | 1 + .../processes/ReconcileIndexStep.java | 1 + .../processes/BasepullIndexStepTest.java | 40 +++++++++++++++++++ .../processes/FullReindexStepTest.java | 39 ++++++++++++++++++ .../processes/ReconcileIndexStepTest.java | 39 ++++++++++++++++++ 5 files changed, 120 insertions(+) diff --git a/src/main/java/com/kingsrook/qbits/quicksearch/processes/BasepullIndexStep.java b/src/main/java/com/kingsrook/qbits/quicksearch/processes/BasepullIndexStep.java index facdd8f..26cb65c 100644 --- a/src/main/java/com/kingsrook/qbits/quicksearch/processes/BasepullIndexStep.java +++ b/src/main/java/com/kingsrook/qbits/quicksearch/processes/BasepullIndexStep.java @@ -427,6 +427,7 @@ public class BasepullIndexStep extends AbstractIndexingStep } catch(Exception e) { + LOG.warn("Could not count indexed documents for table; leaving documentCount empty", e, logPair("tableName", tableName)); return (null); } } diff --git a/src/main/java/com/kingsrook/qbits/quicksearch/processes/ReconcileIndexStep.java b/src/main/java/com/kingsrook/qbits/quicksearch/processes/ReconcileIndexStep.java index 74450bd..c2b79bc 100644 --- a/src/main/java/com/kingsrook/qbits/quicksearch/processes/ReconcileIndexStep.java +++ b/src/main/java/com/kingsrook/qbits/quicksearch/processes/ReconcileIndexStep.java @@ -202,6 +202,7 @@ public class ReconcileIndexStep extends AbstractIndexingStep } catch(Exception e) { + LOG.warn("Could not count indexed documents for table; leaving documentCount empty", e, logPair("tableName", tableName)); return (null); } } diff --git a/src/test/java/com/kingsrook/qbits/quicksearch/processes/BasepullIndexStepTest.java b/src/test/java/com/kingsrook/qbits/quicksearch/processes/BasepullIndexStepTest.java index b704bee..32e8e5a 100644 --- a/src/test/java/com/kingsrook/qbits/quicksearch/processes/BasepullIndexStepTest.java +++ b/src/test/java/com/kingsrook/qbits/quicksearch/processes/BasepullIndexStepTest.java @@ -30,6 +30,8 @@ import com.kingsrook.qqq.backend.core.actions.tables.QueryAction; import com.kingsrook.qqq.backend.core.actions.tables.UpdateAction; import com.kingsrook.qqq.backend.core.context.QContext; import com.kingsrook.qqq.backend.core.exceptions.QException; +import com.kingsrook.qqq.backend.core.logging.QCollectingLogger; +import com.kingsrook.qqq.backend.core.logging.QLogger; import com.kingsrook.qqq.backend.core.model.actions.processes.RunBackendStepInput; import com.kingsrook.qqq.backend.core.model.actions.processes.RunBackendStepOutput; import com.kingsrook.qqq.backend.core.model.actions.tables.delete.DeleteInput; @@ -50,6 +52,7 @@ import com.kingsrook.qbits.quicksearch.model.QuickSearchIndexRun; import com.kingsrook.qbits.quicksearch.opensearch.BulkIndexResult; import com.kingsrook.qbits.quicksearch.opensearch.OpenSearchDocument; import com.kingsrook.qbits.quicksearch.opensearch.QuickSearchOpenSearchClient; +import org.apache.logging.log4j.Level; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; @@ -317,6 +320,43 @@ class BasepullIndexStepTest extends BaseQuickSearchTest + /******************************************************************************* + ** Test: a failing document count is logged at WARN with the table name, and + ** the run still completes with no documentCount. + *******************************************************************************/ + @Test + void testDocumentCountFails_loggedAsWarning_runCompletes() throws QException + { + insertTestEntities(1); + insertIndexRow(TEST_ENTITY_TABLE, true, null, 5); + when(mockClient.countDocumentsForTable(TEST_ENTITY_TABLE)).thenThrow(new QException("count failed")); + + QCollectingLogger collectingLogger = QLogger.activateCollectingLoggerForClass(BasepullIndexStep.class); + try + { + new BasepullIndexStep().run(new RunBackendStepInput(), new RunBackendStepOutput()); + } + finally + { + QLogger.deactivateCollectingLoggerForClass(BasepullIndexStep.class); + } + + assertThat(collectingLogger.getCollectedMessages()) + .filteredOn(m -> Level.WARN.equals(m.getLevel()) && m.getMessage().contains("Could not count indexed documents")) + .singleElement() + .satisfies(m -> + { + assertThat(m.getMessage()).contains("\"tableName\":\"" + TEST_ENTITY_TABLE + "\""); + assertThat(m.getMessage()).contains("\"stackTrace\"").contains("count failed"); + }); + + QRecord row = queryAll(QuickSearchIndex.TABLE_NAME).get(0); + assertThat(row.getValueString("lastRunStatus")).isEqualTo("BASEPULL COMPLETED"); + assertThat(row.getValue("documentCount")).isNull(); + } + + + /******************************************************************************* ** Test: index with a very recent lastBasepullTime and 60-minute interval is ** skipped (not yet due). diff --git a/src/test/java/com/kingsrook/qbits/quicksearch/processes/FullReindexStepTest.java b/src/test/java/com/kingsrook/qbits/quicksearch/processes/FullReindexStepTest.java index 2488c00..9a5c5e5 100644 --- a/src/test/java/com/kingsrook/qbits/quicksearch/processes/FullReindexStepTest.java +++ b/src/test/java/com/kingsrook/qbits/quicksearch/processes/FullReindexStepTest.java @@ -22,6 +22,8 @@ import java.util.List; import com.kingsrook.qqq.backend.core.actions.tables.InsertAction; import com.kingsrook.qqq.backend.core.actions.tables.QueryAction; import com.kingsrook.qqq.backend.core.exceptions.QException; +import com.kingsrook.qqq.backend.core.logging.QCollectingLogger; +import com.kingsrook.qqq.backend.core.logging.QLogger; import com.kingsrook.qqq.backend.core.model.actions.processes.RunBackendStepInput; import com.kingsrook.qqq.backend.core.model.actions.processes.RunBackendStepOutput; import com.kingsrook.qqq.backend.core.model.actions.tables.insert.InsertInput; @@ -37,6 +39,7 @@ import com.kingsrook.qbits.quicksearch.model.QuickSearchIndexRun; import com.kingsrook.qbits.quicksearch.opensearch.BulkIndexResult; import com.kingsrook.qbits.quicksearch.opensearch.OpenSearchDocument; import com.kingsrook.qbits.quicksearch.opensearch.QuickSearchOpenSearchClient; +import org.apache.logging.log4j.Level; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; @@ -252,6 +255,42 @@ class FullReindexStepTest extends BaseQuickSearchTest + /******************************************************************************* + ** Test: a failing document count after the swap is logged at WARN with the + ** table name, and the run still completes with no documentCount. + *******************************************************************************/ + @Test + void testAllTables_documentCountFails_loggedAsWarning_runCompletes() throws QException + { + insertTestEntities(1); + when(mockClient.countDocumentsForTable(TEST_ENTITY_TABLE)).thenThrow(new QException("count failed")); + + QCollectingLogger collectingLogger = QLogger.activateCollectingLoggerForClass(ReconcileIndexStep.class); + try + { + new FullReindexStep().run(new RunBackendStepInput(), new RunBackendStepOutput()); + } + finally + { + QLogger.deactivateCollectingLoggerForClass(ReconcileIndexStep.class); + } + + assertThat(collectingLogger.getCollectedMessages()) + .filteredOn(m -> Level.WARN.equals(m.getLevel()) && m.getMessage().contains("Could not count indexed documents")) + .singleElement() + .satisfies(m -> + { + assertThat(m.getMessage()).contains("\"tableName\":\"" + TEST_ENTITY_TABLE + "\""); + assertThat(m.getMessage()).contains("\"stackTrace\"").contains("count failed"); + }); + + QRecord row = queryIndexRow(); + assertThat(row.getValueString("lastRunStatus")).isEqualTo("FULL_REINDEX COMPLETED"); + assertThat(row.getValue("documentCount")).isNull(); + } + + + /******************************************************************************* ** Test: an empty source table still produces a new physical index, a ** swap, and a COMPLETED run with zero counts. diff --git a/src/test/java/com/kingsrook/qbits/quicksearch/processes/ReconcileIndexStepTest.java b/src/test/java/com/kingsrook/qbits/quicksearch/processes/ReconcileIndexStepTest.java index b765a7c..7da321f 100644 --- a/src/test/java/com/kingsrook/qbits/quicksearch/processes/ReconcileIndexStepTest.java +++ b/src/test/java/com/kingsrook/qbits/quicksearch/processes/ReconcileIndexStepTest.java @@ -24,6 +24,8 @@ import java.util.List; import com.kingsrook.qqq.backend.core.actions.tables.InsertAction; import com.kingsrook.qqq.backend.core.actions.tables.QueryAction; import com.kingsrook.qqq.backend.core.exceptions.QException; +import com.kingsrook.qqq.backend.core.logging.QCollectingLogger; +import com.kingsrook.qqq.backend.core.logging.QLogger; import com.kingsrook.qqq.backend.core.model.actions.processes.RunBackendStepInput; import com.kingsrook.qqq.backend.core.model.actions.processes.RunBackendStepOutput; import com.kingsrook.qqq.backend.core.model.actions.tables.insert.InsertInput; @@ -37,6 +39,7 @@ import com.kingsrook.qbits.quicksearch.model.QuickSearchIndexRun; import com.kingsrook.qbits.quicksearch.opensearch.BulkIndexResult; import com.kingsrook.qbits.quicksearch.opensearch.OpenSearchDocument; import com.kingsrook.qbits.quicksearch.opensearch.QuickSearchOpenSearchClient; +import org.apache.logging.log4j.Level; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; @@ -270,6 +273,42 @@ class ReconcileIndexStepTest extends BaseQuickSearchTest + /******************************************************************************* + ** Test: a failing document count is logged at WARN with the table name, and + ** the run still completes with no documentCount. + *******************************************************************************/ + @Test + void testReconcile_documentCountFails_loggedAsWarning_runCompletes() throws QException + { + insertTestEntities(1); + when(mockClient.countDocumentsForTable(TEST_ENTITY_TABLE)).thenThrow(new QException("count failed")); + + QCollectingLogger collectingLogger = QLogger.activateCollectingLoggerForClass(ReconcileIndexStep.class); + try + { + new ReconcileIndexStep().run(new RunBackendStepInput(), new RunBackendStepOutput()); + } + finally + { + QLogger.deactivateCollectingLoggerForClass(ReconcileIndexStep.class); + } + + assertThat(collectingLogger.getCollectedMessages()) + .filteredOn(m -> Level.WARN.equals(m.getLevel()) && m.getMessage().contains("Could not count indexed documents")) + .singleElement() + .satisfies(m -> + { + assertThat(m.getMessage()).contains("\"tableName\":\"" + TEST_ENTITY_TABLE + "\""); + assertThat(m.getMessage()).contains("\"stackTrace\"").contains("count failed"); + }); + + QRecord row = queryAll(QuickSearchIndex.TABLE_NAME).get(0); + assertThat(row.getValueString("lastRunStatus")).isEqualTo("RECONCILE COMPLETED"); + assertThat(row.getValue("documentCount")).isNull(); + } + + + /******************************************************************************* ** Test: the tableName input limits the run to that table. *******************************************************************************/ -- 2.54.0 From 4585b0144d8253917c6c60915af244179e666062 Mon Sep 17 00:00:00 2001 From: James Maes Date: Tue, 6 Oct 2026 18:17:57 -0500 Subject: [PATCH 2/2] fix(#17): keep the previous documentCount when the count fails A failed count no longer overwrites documentCount with null; the three callers now skip the field, and BasepullIndexStep reuses ReconcileIndexStep.safeCount instead of its own copy. Refs #17 --- .../processes/BasepullIndexStep.java | 25 ++++--------------- .../processes/FullReindexStep.java | 6 ++++- .../processes/ReconcileIndexStep.java | 11 +++++--- .../processes/BasepullIndexStepTest.java | 22 +++++++++++----- .../processes/FullReindexStepTest.java | 21 +++++++++++++--- .../processes/ReconcileIndexStepTest.java | 20 ++++++++++++--- 6 files changed, 69 insertions(+), 36 deletions(-) diff --git a/src/main/java/com/kingsrook/qbits/quicksearch/processes/BasepullIndexStep.java b/src/main/java/com/kingsrook/qbits/quicksearch/processes/BasepullIndexStep.java index 26cb65c..9b98c93 100644 --- a/src/main/java/com/kingsrook/qbits/quicksearch/processes/BasepullIndexStep.java +++ b/src/main/java/com/kingsrook/qbits/quicksearch/processes/BasepullIndexStep.java @@ -217,7 +217,11 @@ public class BasepullIndexStep extends AbstractIndexingStep { Map values = new HashMap<>(); values.put("lastBasepullTime", runStart); - values.put("documentCount", safeCount(client, tableName)); + Integer documentCount = ReconcileIndexStep.safeCount(client, tableName); + if(documentCount != null) + { + values.put("documentCount", documentCount); + } updateIndexRow(index.getId(), values); } @@ -413,23 +417,4 @@ public class BasepullIndexStep extends AbstractIndexingStep } } - - - /******************************************************************************* - ** - *******************************************************************************/ - private static Integer safeCount(QuickSearchOpenSearchClient client, String tableName) - { - try - { - Long count = client.countDocumentsForTable(tableName); - return (count == null ? null : count.intValue()); - } - catch(Exception e) - { - LOG.warn("Could not count indexed documents for table; leaving documentCount empty", e, logPair("tableName", tableName)); - return (null); - } - } - } diff --git a/src/main/java/com/kingsrook/qbits/quicksearch/processes/FullReindexStep.java b/src/main/java/com/kingsrook/qbits/quicksearch/processes/FullReindexStep.java index 48f0430..dd3d9ca 100644 --- a/src/main/java/com/kingsrook/qbits/quicksearch/processes/FullReindexStep.java +++ b/src/main/java/com/kingsrook/qbits/quicksearch/processes/FullReindexStep.java @@ -150,7 +150,11 @@ public class FullReindexStep extends AbstractIndexingStep values.put("lastFullReindexTime", Instant.now()); values.put("lastBasepullTime", startTimes.get(tableName)); values.put("recordCount", tableCounts.processed()); - values.put("documentCount", ReconcileIndexStep.safeCount(client, tableName)); + Integer documentCount = ReconcileIndexStep.safeCount(client, tableName); + if(documentCount != null) + { + values.put("documentCount", documentCount); + } values.put("searchableFieldsJson", buildSearchableFieldsJson(tableConfig)); values.put("status", STATUS_ACTIVE); updateIndexRow(runs.get(tableConfig).getQuickSearchIndexId(), values); diff --git a/src/main/java/com/kingsrook/qbits/quicksearch/processes/ReconcileIndexStep.java b/src/main/java/com/kingsrook/qbits/quicksearch/processes/ReconcileIndexStep.java index c2b79bc..035d700 100644 --- a/src/main/java/com/kingsrook/qbits/quicksearch/processes/ReconcileIndexStep.java +++ b/src/main/java/com/kingsrook/qbits/quicksearch/processes/ReconcileIndexStep.java @@ -144,7 +144,11 @@ public class ReconcileIndexStep extends AbstractIndexingStep values.put("lastReconcileTime", Instant.now()); values.put("lastBasepullTime", reconcileStart); values.put("recordCount", counts.processed()); - values.put("documentCount", safeCount(client, tableName)); + Integer documentCount = safeCount(client, tableName); + if(documentCount != null) + { + values.put("documentCount", documentCount); + } values.put("searchableFieldsJson", buildSearchableFieldsJson(tableConfig)); values.put("status", STATUS_ACTIVE); if(ReconcileIndexStep.RUN_TYPE.equals(runType) == false) @@ -191,7 +195,8 @@ public class ReconcileIndexStep extends AbstractIndexingStep /******************************************************************************* - ** + ** Number of documents indexed for the table, or null when the count fails + ** (logged), so callers keep the previous documentCount. *******************************************************************************/ static Integer safeCount(QuickSearchOpenSearchClient client, String tableName) { @@ -202,7 +207,7 @@ public class ReconcileIndexStep extends AbstractIndexingStep } catch(Exception e) { - LOG.warn("Could not count indexed documents for table; leaving documentCount empty", e, logPair("tableName", tableName)); + LOG.warn("Could not count indexed documents for table; keeping the previous documentCount", e, logPair("tableName", tableName)); return (null); } } diff --git a/src/test/java/com/kingsrook/qbits/quicksearch/processes/BasepullIndexStepTest.java b/src/test/java/com/kingsrook/qbits/quicksearch/processes/BasepullIndexStepTest.java index 32e8e5a..5b9cf1b 100644 --- a/src/test/java/com/kingsrook/qbits/quicksearch/processes/BasepullIndexStepTest.java +++ b/src/test/java/com/kingsrook/qbits/quicksearch/processes/BasepullIndexStepTest.java @@ -322,23 +322,32 @@ class BasepullIndexStepTest extends BaseQuickSearchTest /******************************************************************************* ** Test: a failing document count is logged at WARN with the table name, and - ** the run still completes with no documentCount. + ** the run still completes, keeping the previous documentCount. *******************************************************************************/ @Test - void testDocumentCountFails_loggedAsWarning_runCompletes() throws QException + void testDocumentCountFails_loggedAsWarning_previousCountKept() throws QException { insertTestEntities(1); - insertIndexRow(TEST_ENTITY_TABLE, true, null, 5); + QRecord indexRow = insertIndexRow(TEST_ENTITY_TABLE, true, null, 5); + + UpdateInput seedInput = new UpdateInput(); + seedInput.setTableName(QuickSearchIndex.TABLE_NAME); + seedInput.setRecords(List.of(new QRecord().withValue("id", indexRow.getValue("id")).withValue("documentCount", 99))); + new UpdateAction().execute(seedInput); + when(mockClient.countDocumentsForTable(TEST_ENTITY_TABLE)).thenThrow(new QException("count failed")); - QCollectingLogger collectingLogger = QLogger.activateCollectingLoggerForClass(BasepullIndexStep.class); + ////////////////////////////////////////////////////////////////// + // the count, and so its warning, belongs to ReconcileIndexStep // + ////////////////////////////////////////////////////////////////// + QCollectingLogger collectingLogger = QLogger.activateCollectingLoggerForClass(ReconcileIndexStep.class); try { new BasepullIndexStep().run(new RunBackendStepInput(), new RunBackendStepOutput()); } finally { - QLogger.deactivateCollectingLoggerForClass(BasepullIndexStep.class); + QLogger.deactivateCollectingLoggerForClass(ReconcileIndexStep.class); } assertThat(collectingLogger.getCollectedMessages()) @@ -352,7 +361,8 @@ class BasepullIndexStepTest extends BaseQuickSearchTest QRecord row = queryAll(QuickSearchIndex.TABLE_NAME).get(0); assertThat(row.getValueString("lastRunStatus")).isEqualTo("BASEPULL COMPLETED"); - assertThat(row.getValue("documentCount")).isNull(); + assertThat(row.getValue("lastBasepullTime")).isNotNull(); + assertThat(row.getValueInteger("documentCount")).isEqualTo(99); } diff --git a/src/test/java/com/kingsrook/qbits/quicksearch/processes/FullReindexStepTest.java b/src/test/java/com/kingsrook/qbits/quicksearch/processes/FullReindexStepTest.java index 9a5c5e5..94567d1 100644 --- a/src/test/java/com/kingsrook/qbits/quicksearch/processes/FullReindexStepTest.java +++ b/src/test/java/com/kingsrook/qbits/quicksearch/processes/FullReindexStepTest.java @@ -124,6 +124,17 @@ class FullReindexStepTest extends BaseQuickSearchTest ** Insert a quickSearchIndex row for testEntity with the given enabled flag. *******************************************************************************/ private void insertIndexRow(Boolean enabled) throws QException + { + insertIndexRow(enabled, null); + } + + + + /******************************************************************************* + ** Insert a quickSearchIndex row for testEntity with the given enabled flag + ** and documentCount. + *******************************************************************************/ + private void insertIndexRow(Boolean enabled, Integer documentCount) throws QException { InsertInput insertInput = new InsertInput(); insertInput.setTableName(QuickSearchIndex.TABLE_NAME); @@ -131,6 +142,7 @@ class FullReindexStepTest extends BaseQuickSearchTest .withValue("tableName", TEST_ENTITY_TABLE) .withValue("enabled", enabled) .withValue("basepullIntervalMinutes", 5) + .withValue("documentCount", documentCount) .withValue("status", "ACTIVE"))); new InsertAction().execute(insertInput); } @@ -257,12 +269,14 @@ class FullReindexStepTest extends BaseQuickSearchTest /******************************************************************************* ** Test: a failing document count after the swap is logged at WARN with the - ** table name, and the run still completes with no documentCount. + ** table name, and the run still completes, keeping the previous + ** documentCount. *******************************************************************************/ @Test - void testAllTables_documentCountFails_loggedAsWarning_runCompletes() throws QException + void testAllTables_documentCountFails_loggedAsWarning_previousCountKept() throws QException { insertTestEntities(1); + insertIndexRow(true, 99); when(mockClient.countDocumentsForTable(TEST_ENTITY_TABLE)).thenThrow(new QException("count failed")); QCollectingLogger collectingLogger = QLogger.activateCollectingLoggerForClass(ReconcileIndexStep.class); @@ -286,7 +300,8 @@ class FullReindexStepTest extends BaseQuickSearchTest QRecord row = queryIndexRow(); assertThat(row.getValueString("lastRunStatus")).isEqualTo("FULL_REINDEX COMPLETED"); - assertThat(row.getValue("documentCount")).isNull(); + assertThat(row.getValueInteger("recordCount")).isEqualTo(1); + assertThat(row.getValueInteger("documentCount")).isEqualTo(99); } diff --git a/src/test/java/com/kingsrook/qbits/quicksearch/processes/ReconcileIndexStepTest.java b/src/test/java/com/kingsrook/qbits/quicksearch/processes/ReconcileIndexStepTest.java index 7da321f..5b417ea 100644 --- a/src/test/java/com/kingsrook/qbits/quicksearch/processes/ReconcileIndexStepTest.java +++ b/src/test/java/com/kingsrook/qbits/quicksearch/processes/ReconcileIndexStepTest.java @@ -275,12 +275,13 @@ class ReconcileIndexStepTest extends BaseQuickSearchTest /******************************************************************************* ** Test: a failing document count is logged at WARN with the table name, and - ** the run still completes with no documentCount. + ** the run still completes, keeping the previous documentCount. *******************************************************************************/ @Test - void testReconcile_documentCountFails_loggedAsWarning_runCompletes() throws QException + void testReconcile_documentCountFails_loggedAsWarning_previousCountKept() throws QException { insertTestEntities(1); + insertIndexRow(true, 99); when(mockClient.countDocumentsForTable(TEST_ENTITY_TABLE)).thenThrow(new QException("count failed")); QCollectingLogger collectingLogger = QLogger.activateCollectingLoggerForClass(ReconcileIndexStep.class); @@ -304,7 +305,8 @@ class ReconcileIndexStepTest extends BaseQuickSearchTest QRecord row = queryAll(QuickSearchIndex.TABLE_NAME).get(0); assertThat(row.getValueString("lastRunStatus")).isEqualTo("RECONCILE COMPLETED"); - assertThat(row.getValue("documentCount")).isNull(); + assertThat(row.getValueInteger("recordCount")).isEqualTo(1); + assertThat(row.getValueInteger("documentCount")).isEqualTo(99); } @@ -332,6 +334,17 @@ class ReconcileIndexStepTest extends BaseQuickSearchTest ** Insert a quickSearchIndex row for testEntity with the given enabled flag. *******************************************************************************/ private void insertIndexRow(Boolean enabled) throws QException + { + insertIndexRow(enabled, null); + } + + + + /******************************************************************************* + ** Insert a quickSearchIndex row for testEntity with the given enabled flag + ** and documentCount. + *******************************************************************************/ + private void insertIndexRow(Boolean enabled, Integer documentCount) throws QException { InsertInput insertInput = new InsertInput(); insertInput.setTableName(QuickSearchIndex.TABLE_NAME); @@ -339,6 +352,7 @@ class ReconcileIndexStepTest extends BaseQuickSearchTest .withValue("tableName", TEST_ENTITY_TABLE) .withValue("enabled", enabled) .withValue("basepullIntervalMinutes", 5) + .withValue("documentCount", documentCount) .withValue("status", "ACTIVE"))); new InsertAction().execute(insertInput); } -- 2.54.0