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

jay vyas commented on BIGTOP-1019:
----------------------------------

First, a test class would have to be extended from an existing JDBC Mock Driver 
, like this one 
http://mockrunner.sourceforge.net/doc/api/com/mockrunner/mock/jdbc/MockDriver.html.

Then, given that this class is on the classpath for all the nodes in the test, 
you would specify the class name with the --driver method in the sqoop 
commandline.

The result would be that the Mock class would respond to all JDBC queries and 
return data.  
Not sure if this is a concern, but parallel IO should work just fine since 
there would be a different mock running in the JVM of each task. 

That is an advantage of the mock : I think parallel IO tests of sqoop, were 
they ever to be implemented, would require sharing the database server urls 
etc...  But parallel queries against a mock connection can be done without 
having any underlying database infrastructure. 

Does that help ? 
                
> Remove mysql requirement constraint from sqoop tests
> ----------------------------------------------------
>
>                 Key: BIGTOP-1019
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-1019
>             Project: Bigtop
>          Issue Type: Improvement
>          Components: Tests
>    Affects Versions: 0.6.0
>            Reporter: Konstantin Boudnik
>             Fix For: 0.7.0
>
>
> Existing Sqoop tests contradict self-sufficiency of the integration testing 
> paradigm. The tests require an axillary mysql server configuration. While it 
> might be acceptable for an established infrastructure it clearly has the 
> disadvantage for ad-hoc testing, where one needs to make sure that a 
> specially configured mysql is available.
> Replacing mysql with H2 for the testing would solve the problem elegantly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to