You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2010/10/19 17:12:27 UTC

[jira] Created: (SOLR-2175) DIH needs Mock (or real in-memory) JDBC/Mail impls for tests... especially JDBC

DIH needs Mock (or real in-memory) JDBC/Mail impls for tests... especially JDBC
-------------------------------------------------------------------------------

                 Key: SOLR-2175
                 URL: https://issues.apache.org/jira/browse/SOLR-2175
             Project: Solr
          Issue Type: Test
          Components: contrib - DataImportHandler
            Reporter: Robert Muir


contrib/dih has some @Ignored tests because there is no in-memory or mock database/mail server:

{noformat}
    [junit] ------------- ---------------- ---------------
    [junit] Testsuite: org.apache.solr.handler.dataimport.TestJdbcDataSource
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.034 sec
    [junit]
    [junit] ------------- Standard Error -----------------
    [junit] NOTE: Ignoring test method 'testBasic': Needs a Mock database server to work
...
    [junit] Testsuite: org.apache.solr.handler.dataimport.TestMailEntityProcessor
    [junit] Tests run: 0, Failures: 0, Errors: 0, Time elapsed: 0.038 sec
    [junit]
    [junit] ------------- Standard Error -----------------
    [junit] NOTE: Ignoring test method 'testConnection': Needs a Mock Mail Server to work
    [junit] NOTE: Ignoring test method 'testRecursion': Needs a Mock Mail Server to work
    [junit] NOTE: Ignoring test method 'testExclude': Needs a Mock Mail Server to work
    [junit] NOTE: Ignoring test method 'testInclude': Needs a Mock Mail Server to work
    [junit] NOTE: Ignoring test method 'testIncludeAndExclude': Needs a Mock Mail Server to work
    [junit] NOTE: Ignoring test method 'testFetchTimeSince': Needs a Mock Mail Server to work
    [junit] ------------- ---------------- ---------------
{noformat}

One way to improve this would be to use something like apache derby for tests to make little databases and test against.

Additionally, looking thru JIRA there are a lot of JDBC-related issues and once something like this is setup,
I think things could improve without introducing more bugs.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (SOLR-2175) DIH needs Mock (or real in-memory) JDBC/Mail impls for tests... especially JDBC

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922675#action_12922675 ] 

Hoss Man commented on SOLR-2175:
--------------------------------

"example/example-DIH" already includes the hsqldb jar and a sample hsqldb (on disk) that the "db" core indexes as a demo.

that could be repurposed as a test (either via refactoring, or along the lines of the existing "example" tests that actually verify the example works correctly by spinning up jetty)

> DIH needs Mock (or real in-memory) JDBC/Mail impls for tests... especially JDBC
> -------------------------------------------------------------------------------
>
>                 Key: SOLR-2175
>                 URL: https://issues.apache.org/jira/browse/SOLR-2175
>             Project: Solr
>          Issue Type: Test
>          Components: contrib - DataImportHandler
>            Reporter: Robert Muir
>
> contrib/dih has some @Ignored tests because there is no in-memory or mock database/mail server:
> {noformat}
>     [junit] ------------- ---------------- ---------------
>     [junit] Testsuite: org.apache.solr.handler.dataimport.TestJdbcDataSource
>     [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.034 sec
>     [junit]
>     [junit] ------------- Standard Error -----------------
>     [junit] NOTE: Ignoring test method 'testBasic': Needs a Mock database server to work
> ...
>     [junit] Testsuite: org.apache.solr.handler.dataimport.TestMailEntityProcessor
>     [junit] Tests run: 0, Failures: 0, Errors: 0, Time elapsed: 0.038 sec
>     [junit]
>     [junit] ------------- Standard Error -----------------
>     [junit] NOTE: Ignoring test method 'testConnection': Needs a Mock Mail Server to work
>     [junit] NOTE: Ignoring test method 'testRecursion': Needs a Mock Mail Server to work
>     [junit] NOTE: Ignoring test method 'testExclude': Needs a Mock Mail Server to work
>     [junit] NOTE: Ignoring test method 'testInclude': Needs a Mock Mail Server to work
>     [junit] NOTE: Ignoring test method 'testIncludeAndExclude': Needs a Mock Mail Server to work
>     [junit] NOTE: Ignoring test method 'testFetchTimeSince': Needs a Mock Mail Server to work
>     [junit] ------------- ---------------- ---------------
> {noformat}
> One way to improve this would be to use something like apache derby for tests to make little databases and test against.
> Additionally, looking thru JIRA there are a lot of JDBC-related issues and once something like this is setup,
> I think things could improve without introducing more bugs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Issue Comment Edited: (SOLR-2175) DIH needs Mock (or real in-memory) JDBC/Mail impls for tests... especially JDBC

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922594#action_12922594 ] 

Uwe Schindler edited comment on SOLR-2175 at 10/19/10 11:48 AM:
----------------------------------------------------------------

we could bundle HSQLDB for an internal test-only database [if java6, alternatively Apache Derby is bundled with the JDK in some cases - but derby always creates files on disk]. We could then use it to fill a database. Ideally we should simply provide the HSQLDB dump output in the tests/resources folder (which contains of tons of CREATE TABLE, INSERT,...) statements that on-the-fly build the database in memory. After that we run the tests and release the JDBC driver again.

      was (Author: thetaphi):
    we could bundle HSQLDB for an internal test-only database [if java6, Apache Derby is bundled with the JDK in some cases]. We could then use it to fill a database. Ideally we should simply provide the HSQLDB dump output in the tests/resources folder (which contains of tons of CREATE TABLE, INSERT,...) statements that on-the-fly build the database in memory. After that we run the tests and release the JDBC driver again.
  
> DIH needs Mock (or real in-memory) JDBC/Mail impls for tests... especially JDBC
> -------------------------------------------------------------------------------
>
>                 Key: SOLR-2175
>                 URL: https://issues.apache.org/jira/browse/SOLR-2175
>             Project: Solr
>          Issue Type: Test
>          Components: contrib - DataImportHandler
>            Reporter: Robert Muir
>
> contrib/dih has some @Ignored tests because there is no in-memory or mock database/mail server:
> {noformat}
>     [junit] ------------- ---------------- ---------------
>     [junit] Testsuite: org.apache.solr.handler.dataimport.TestJdbcDataSource
>     [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.034 sec
>     [junit]
>     [junit] ------------- Standard Error -----------------
>     [junit] NOTE: Ignoring test method 'testBasic': Needs a Mock database server to work
> ...
>     [junit] Testsuite: org.apache.solr.handler.dataimport.TestMailEntityProcessor
>     [junit] Tests run: 0, Failures: 0, Errors: 0, Time elapsed: 0.038 sec
>     [junit]
>     [junit] ------------- Standard Error -----------------
>     [junit] NOTE: Ignoring test method 'testConnection': Needs a Mock Mail Server to work
>     [junit] NOTE: Ignoring test method 'testRecursion': Needs a Mock Mail Server to work
>     [junit] NOTE: Ignoring test method 'testExclude': Needs a Mock Mail Server to work
>     [junit] NOTE: Ignoring test method 'testInclude': Needs a Mock Mail Server to work
>     [junit] NOTE: Ignoring test method 'testIncludeAndExclude': Needs a Mock Mail Server to work
>     [junit] NOTE: Ignoring test method 'testFetchTimeSince': Needs a Mock Mail Server to work
>     [junit] ------------- ---------------- ---------------
> {noformat}
> One way to improve this would be to use something like apache derby for tests to make little databases and test against.
> Additionally, looking thru JIRA there are a lot of JDBC-related issues and once something like this is setup,
> I think things could improve without introducing more bugs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (SOLR-2175) DIH needs Mock (or real in-memory) JDBC/Mail impls for tests... especially JDBC

Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922600#action_12922600 ] 

Robert Muir commented on SOLR-2175:
-----------------------------------

bq. we could bundle HSQLDB for an internal test-only database [if java6, alternatively Apache Derby is bundled with the JDK in some cases - but derby always creates files on disk]

Yes, I'm a big fan of HSQLDB (never really used Derby). 
But either one is fine with me, since currently we are not really testing JDBC at all...

if someone knows Derby and wants to implement a patch, 
as long as it uses TEMP_DIR its just great if it creates relatively small files on disk in tests.


> DIH needs Mock (or real in-memory) JDBC/Mail impls for tests... especially JDBC
> -------------------------------------------------------------------------------
>
>                 Key: SOLR-2175
>                 URL: https://issues.apache.org/jira/browse/SOLR-2175
>             Project: Solr
>          Issue Type: Test
>          Components: contrib - DataImportHandler
>            Reporter: Robert Muir
>
> contrib/dih has some @Ignored tests because there is no in-memory or mock database/mail server:
> {noformat}
>     [junit] ------------- ---------------- ---------------
>     [junit] Testsuite: org.apache.solr.handler.dataimport.TestJdbcDataSource
>     [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.034 sec
>     [junit]
>     [junit] ------------- Standard Error -----------------
>     [junit] NOTE: Ignoring test method 'testBasic': Needs a Mock database server to work
> ...
>     [junit] Testsuite: org.apache.solr.handler.dataimport.TestMailEntityProcessor
>     [junit] Tests run: 0, Failures: 0, Errors: 0, Time elapsed: 0.038 sec
>     [junit]
>     [junit] ------------- Standard Error -----------------
>     [junit] NOTE: Ignoring test method 'testConnection': Needs a Mock Mail Server to work
>     [junit] NOTE: Ignoring test method 'testRecursion': Needs a Mock Mail Server to work
>     [junit] NOTE: Ignoring test method 'testExclude': Needs a Mock Mail Server to work
>     [junit] NOTE: Ignoring test method 'testInclude': Needs a Mock Mail Server to work
>     [junit] NOTE: Ignoring test method 'testIncludeAndExclude': Needs a Mock Mail Server to work
>     [junit] NOTE: Ignoring test method 'testFetchTimeSince': Needs a Mock Mail Server to work
>     [junit] ------------- ---------------- ---------------
> {noformat}
> One way to improve this would be to use something like apache derby for tests to make little databases and test against.
> Additionally, looking thru JIRA there are a lot of JDBC-related issues and once something like this is setup,
> I think things could improve without introducing more bugs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (SOLR-2175) DIH needs Mock (or real in-memory) JDBC/Mail impls for tests... especially JDBC

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922594#action_12922594 ] 

Uwe Schindler commented on SOLR-2175:
-------------------------------------

we could bundle HSQLDB for an internal test-only database [if java6, Apache Derby is bundled with the JDK in some cases]. We could then use it to fill a database. Ideally we should simply provide the HSQLDB dump output in the tests/resources folder (which contains of tons of CREATE TABLE, INSERT,...) statements that on-the-fly build the database in memory. After that we run the tests and release the JDBC driver again.

> DIH needs Mock (or real in-memory) JDBC/Mail impls for tests... especially JDBC
> -------------------------------------------------------------------------------
>
>                 Key: SOLR-2175
>                 URL: https://issues.apache.org/jira/browse/SOLR-2175
>             Project: Solr
>          Issue Type: Test
>          Components: contrib - DataImportHandler
>            Reporter: Robert Muir
>
> contrib/dih has some @Ignored tests because there is no in-memory or mock database/mail server:
> {noformat}
>     [junit] ------------- ---------------- ---------------
>     [junit] Testsuite: org.apache.solr.handler.dataimport.TestJdbcDataSource
>     [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.034 sec
>     [junit]
>     [junit] ------------- Standard Error -----------------
>     [junit] NOTE: Ignoring test method 'testBasic': Needs a Mock database server to work
> ...
>     [junit] Testsuite: org.apache.solr.handler.dataimport.TestMailEntityProcessor
>     [junit] Tests run: 0, Failures: 0, Errors: 0, Time elapsed: 0.038 sec
>     [junit]
>     [junit] ------------- Standard Error -----------------
>     [junit] NOTE: Ignoring test method 'testConnection': Needs a Mock Mail Server to work
>     [junit] NOTE: Ignoring test method 'testRecursion': Needs a Mock Mail Server to work
>     [junit] NOTE: Ignoring test method 'testExclude': Needs a Mock Mail Server to work
>     [junit] NOTE: Ignoring test method 'testInclude': Needs a Mock Mail Server to work
>     [junit] NOTE: Ignoring test method 'testIncludeAndExclude': Needs a Mock Mail Server to work
>     [junit] NOTE: Ignoring test method 'testFetchTimeSince': Needs a Mock Mail Server to work
>     [junit] ------------- ---------------- ---------------
> {noformat}
> One way to improve this would be to use something like apache derby for tests to make little databases and test against.
> Additionally, looking thru JIRA there are a lot of JDBC-related issues and once something like this is setup,
> I think things could improve without introducing more bugs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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