[
https://issues.apache.org/jira/browse/BIGTOP-1019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13693230#comment-13693230
]
jay vyas commented on BIGTOP-1019:
----------------------------------
FYI, Im setting up a bigtop dev environment and VM for testing the existing
stuff now. This may be a while, after looking at the code im seeing that
setting up a solid dev environment, as well as removing sql implementation
specifics might not be the most practical approach. So anyone else wants to
jump in feel free. Otherwise, I'll incrementally progress and update along the
way.
Here is the path im taking:
1) Set up dev environment with bigtop sqoop smoke tests.
2) Set up VM with MySQL installed to confirm that reproduce the mysql tests,
passing.
3) Change the code and rebuild the sqoop smoke test jars and confirm that i can
redeploy the smoke tests (i.e. that i have a working dev environment that can
be deployed to my VM).
So far ive looked into the code, which appears to load sql requests from text
files, and Initially, I see there is a lot of SQL code in the mysql tests . It
remains to be seen wether mocking will even be practical. I might first try
swapping in derby/h2 as a first pass, to see if decoupling from mysql is easy
enough. Then moving on to mocks or commiting that patch as a first iteration.
Given other obligatins, FYI, this will be slow going. If anyone else wants to
jump in feel free :)
Here is the summary of SQL files used in the existing tests Import/Export
tests. 604 lines in all.
[root@localhost bigtop]# wc `find ./ -name mysql*sql`
38 226 1424
./bigtop-tests/test-artifacts/sqoop/src/main/resources/hbase-sqoop/mysql-load-db.sql
38 202 1285
./bigtop-tests/test-artifacts/sqoop/src/main/resources/hbase-sqoop/mysql-create-db.sql
54 385 2354
./bigtop-tests/test-artifacts/sqoop/src/main/resources/mysql-files/mysql-create-tables.sql
39 175 1174
./bigtop-tests/test-artifacts/sqoop/src/main/resources/mysql-files/mysql-create-db.sql
57 263 3104
./bigtop-tests/test-artifacts/sqoop/src/main/resources/mysql-files/mysql-insert-data.sql
38 226 1420
./bigtop-tests/test-artifacts/sqoop/src/main/resources/hive-sqoop/mysql-load-db.sql
38 202 1277
./bigtop-tests/test-artifacts/sqoop/src/main/resources/hive-sqoop/mysql-create-db.sql
38 226 1424
./bigtop-tests/test-artifacts/sqoop/target/classes/hbase-sqoop/mysql-load-db.sql
38 202 1285
./bigtop-tests/test-artifacts/sqoop/target/classes/hbase-sqoop/mysql-create-db.sql
54 385 2354
./bigtop-tests/test-artifacts/sqoop/target/classes/mysql-files/mysql-create-tables.sql
39 175 1174
./bigtop-tests/test-artifacts/sqoop/target/classes/mysql-files/mysql-create-db.sql
57 263 3104
./bigtop-tests/test-artifacts/sqoop/target/classes/mysql-files/mysql-insert-data.sql
38 226 1420
./bigtop-tests/test-artifacts/sqoop/target/classes/hive-sqoop/mysql-load-db.sql
38 202 1277
./bigtop-tests/test-artifacts/sqoop/target/classes/hive-sqoop/mysql-create-db.sql
604 3358 24076 total
> 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