Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Sqoop >> mail # dev >> Review Request: SQOOP-861 Sqoop2: Integration: Create basic integration infrastructure


Copy link to this message
-
Re: Review Request: SQOOP-861 Sqoop2: Integration: Create basic integration infrastructure

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9281/#review16200
-----------------------------------------------------------

test/pom.xml
<https://reviews.apache.org/r/9281/#comment34630>

    Do you need the version here?

test/src/main/java/org/apache/sqoop/test/minicluster/SqoopMiniCluster.java
<https://reviews.apache.org/r/9281/#comment34634>

    Can you create constants for temporaryPath + "/config" and temporaryPath + "/log" and reuse them instead duplicate them in the rest of code?

test/src/main/java/org/apache/sqoop/test/minicluster/SqoopMiniCluster.java
<https://reviews.apache.org/r/9281/#comment34635>

    Wouldn't it better to use writeLines() instead of doing a file I/O for every line?
    
    For example,
    
    String[] contents = {
       "1st line",
       "2nd line",
       ...
    }
    
    FileUtils.writeLines(f, null, Array.asList(contents), true);

test/src/main/java/org/apache/sqoop/test/minicluster/TomcatSqoopMiniCluster.java
<https://reviews.apache.org/r/9281/#comment34636>

    I can see that tomcat from a previous run gets deleted before running tests, so I am not too worried that stale files will be an issue.
    
    Nonetheless, wouldn't it better to clean up  installed tomcat at the end of tests? I prefer that each test cleans up their mess after they're finished because stale files might effect other tests that happen to use cargo to install tomcat under /tmp although it's not likely.
- Cheolsoo Park
On Feb. 4, 2013, 5:55 a.m., Jarek Cecho wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9281/
> -----------------------------------------------------------
>
> (Updated Feb. 4, 2013, 5:55 a.m.)
>
>
> Review request for Sqoop.
>
>
> Description
> -------
>
> I've created basic infrastructure for integration tests. I'm using cargo for automatic installation and deployment of Sqoop server into Tomcat.
>
> I've included first simple integration test that will connect to the Sqoop server and fetch the version.
>
>
> This addresses bug SQOOP-861.
>     https://issues.apache.org/jira/browse/SQOOP-861
>
>
> Diffs
> -----
>
>   pom.xml 003ac43fe3dc7b8ecccf6d7e912901d02b5d0860
>   test/pom.xml PRE-CREATION
>   test/src/main/java/org/apache/sqoop/test/minicluster/InProcessSqoopMiniCluster.java PRE-CREATION
>   test/src/main/java/org/apache/sqoop/test/minicluster/SqoopMiniCluster.java PRE-CREATION
>   test/src/main/java/org/apache/sqoop/test/minicluster/TomcatSqoopMiniCluster.java PRE-CREATION
>   test/src/test/java/org/apache/sqoop/integration/TomcatTestCase.java PRE-CREATION
>   test/src/test/java/org/apache/sqoop/integration/server/VersionTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/9281/diff/
>
>
> Testing
> -------
>
> mvn clean test # Run only unit tests
> mvn clean integration-test # Run both unit and integration tests
>
>
> Thanks,
>
> Jarek Cecho
>
>