[
https://issues.apache.org/jira/browse/SOLR-17719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17938069#comment-17938069
]
Chris M. Hostetter commented on SOLR-17719:
-------------------------------------------
Suggested improvement:
* Modify the configset usedby the test to use
{{RecordingUpdateProcessorFactory}}
** start recording before adding the docs
* rip out the {{Thread.sleep}}
** replace it with code that uses {{JettySolrRunner.getCoreContainer}} to reach
into the leader replica to get the {{RecordingUpdateProcessorFactory}} instance
for this core, and poll on it's (public) queue until it sees the commit
** See {{DocExpirationUpdateProcessorFactoryTest}} for an example of the polling
> TestManagedSchemaWithMultipleAdd timing related failures (should use a
> semaphore hook to wait for newSearcher)
> --------------------------------------------------------------------------------------------------------------
>
> Key: SOLR-17719
> URL: https://issues.apache.org/jira/browse/SOLR-17719
> Project: Solr
> Issue Type: New Feature
> Reporter: Chris M. Hostetter
> Priority: Major
> Labels: newdev
>
> TestManagedSchemaWithMultipleAdd can fail sporadically – frequently on MacOS.
> The basic logic of the test is to:
> * add a field
> * immediately add some documents using that field
> * wait for autocommit and confirm we can search for those documents
> The problematic bit is the "wait for autocommit" – the test has the following
> bit of code...
> {noformat}
> // The issue we test in this class does not appear when using explicit
> commits.
> // Because of this we are waiting for autoSoftCommit to finish if there
> is one.
> Thread.sleep(AUTOSOFTCOMMIT_MAXTIME_MS + 500); assertEquals(
> numDocs, cloudClient.query(collection, new
> SolrQuery("*:*")).getResults().getNumFound());
> {noformat}
> ...but that assertion can fail anytime the autocommit timer sleep runs a
> little slower then the test sleep.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]