You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2017/07/12 19:00:00 UTC
[jira] [Commented] (SOLR-11053) Improve SoftAutoCommitTest to the
point that we can delete AutoCommitTest and HardAutoCommitTest
[ https://issues.apache.org/jira/browse/SOLR-11053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16084503#comment-16084503 ]
Hoss Man commented on SOLR-11053:
---------------------------------
When Miller first wrote SoftAutoCommitTest back in 2011, it was with the expressly started purpose to "Test auto commit functionality in a way that doesn't suck."
As the javadocs put it...
{code}
/**
* Test auto commit functionality in a way that doesn't suck.
* <p>
* AutoCommitTest is an abomination that is way to brittle in how it
* tries to check that commits happened, and when they happened.
* The goal of this test class is to (ultimately) completely replace all
* of the functionality of that test class using:
* </p>
* <ul>
* <li>A more robust monitor of commit/newSearcher events that records
* the times of those events in a queue that can be polled.
* Multiple events in rapid succession are not lost.
* </li>
* <li>Timing checks that are forgiving of slow machines and use
* knowledge of how slow A->B was to affect the expectation of
* how slow B->C will be
* </li>
* </ul>
*/
{code}
The jenkins failure emails (especially fromthe past few months) back up the implication that the strategy used in SoftAutoCommitTest is much hardier (even on flaky machines) then the approaches taken in AutoCommitTest and HardAutoCommitTest.
----
AFAICT there are esentially only 3 things these "bad" tests currently check that aren't already covered by the existing logic in SoftAutoCommitTest:
* maxDocs
** AutoCommitTest.testMaxDocs() currently checks the "softCommit" aspect (via newSearcher)
** nothing currently seems to test the "hardCommit" side
* commitWithin
** AutoCommitTest.testCommitWithin() currently checks the "softCommit" aspect (via newSearcher)
** HardAutoCommitTest.testCommitWithin() currently checks the "hardCommit" aspect (but also via newSearcher)
...I'll put my thoughts on these in individual sub-tasks
> Improve SoftAutoCommitTest to the point that we can delete AutoCommitTest and HardAutoCommitTest
> ------------------------------------------------------------------------------------------------
>
> Key: SOLR-11053
> URL: https://issues.apache.org/jira/browse/SOLR-11053
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Hoss Man
>
> This jira serves as a parent with the objective of being able to delete AutoCommitTest and HardAutoCommitTest -- w/o any loss in what core functionality is being tested -- by adding equivilent test logic to SoftAutoCommitTest using the (superior) strategies currently found in SoftAutoCommitTest.
> Sub-Tasks will be used to track the discrete changes to be made, so we can phase them in gradually.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org