[ 
https://issues.apache.org/jira/browse/SOLR-3430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13268434#comment-13268434
 ] 

James Dyer commented on SOLR-3430:
----------------------------------

Mikhail,

So far this is a new test and I'm not removing any old tests (yet).  Eventually 
I'd like to replace all of the (cached)SqlEntityProcessor tests with one like 
this.  The point here is to make the tests more realistic, make the tests 
easier to read and understand and to eliminate the need to pollute the class 
api for the sake of the tests (just scan the code for comments like "this 
constructor is for tests only" and for null-checks that are only needed to make 
tests run, etc).

I think the bug found in SOLR-3360 had to do with the multi-threaded feature 
that only exists in 3.x and was removed from Trunk.  Whenever we get to a point 
where we can reintroduce multi-threading to DIH we'll need to be sure all the 
various scenarios get tested.

In the end if our tests mimic closely what an actual user is doing, that is, 
run DIH against realistic datasources using actual DIH configurations, etc, I 
think we'll have more realistic testing and we can catch the real bugs that are 
actually affecting the usability of the product.  You had a good point in the 
past about some unrealistic features in MockDataSource.  Personally I never 
liked using that class to write tests because I found it cumbersome.  I think 
its going to be more "enjoyable" to write tests using a real database.
                
> DIH: More-realistic testing & subsequent bug fix
> ------------------------------------------------
>
>                 Key: SOLR-3430
>                 URL: https://issues.apache.org/jira/browse/SOLR-3430
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 3.6, 4.0
>            Reporter: James Dyer
>            Assignee: James Dyer
>            Priority: Minor
>             Fix For: 4.0, 3.6.1
>
>         Attachments: SOLR-3430.patch, SOLR-3430.patch, derby-10.8.2.2.jar, 
> derby-10.8.2.2.jar.sha1, derby-LICENSE-ASL.txt, derby-NOTICE.txt
>
>
> A couple of people have mentioned on the users' list that 3.6 changes break 
> CachedSqlEntityProcessor.  Part of the problem is the current DIH tests are 
> not realistic:  they mostly test 1 class at a time and not the full 
> end-to-end interactions between components.
> This is a test of (Cached) SqlEntityProcessor using an in-memory Derby 
> database.  This hopefully is a first step in creating a series of new, 
> more-rigorous DIH tests, which is needed in order to make changes without 
> worry.
> This also revealed a bug in SortedMapBackedCache, which is fixed also.  I'm 
> not sure this is the same bug causing problems for the 2 users but once 
> committed I will post a reply on the users' list to see if they can try it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to