Review Board 1.7.22


SQOOP-861 Sqoop2: Integration: Create basic integration infrastructure

Review Request #9281 - Created Feb. 4, 2013 and submitted

Jarek Cecho
SQOOP-861
Reviewers
Sqoop
sqoop-sqoop2
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.
mvn clean test # Run only unit tests
mvn clean integration-test # Run both unit and integration tests
pom.xml
Revision 003ac43fe3dc7b8ecccf6d7e912901d02b5d0860 New Change
[20] 90 lines
[+20]
91
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
91
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
92
    <maven.compile.source>1.6</maven.compile.source>
92
    <maven.compile.source>1.6</maven.compile.source>
93
    <maven.compile.target>1.6</maven.compile.target>
93
    <maven.compile.target>1.6</maven.compile.target>
94
    <commons-dbcp.version>1.4</commons-dbcp.version>
94
    <commons-dbcp.version>1.4</commons-dbcp.version>
95
    <commons-lang.version>2.5</commons-lang.version>
95
    <commons-lang.version>2.5</commons-lang.version>

    
   
96
    <commons-io.version>2.4</commons-io.version>
96
    <derby.version>10.8.2.2</derby.version>
97
    <derby.version>10.8.2.2</derby.version>
97
    <hadoop.1.version>1.0.3</hadoop.1.version>
98
    <hadoop.1.version>1.0.3</hadoop.1.version>
98
    <hadoop.2.version>2.0.2-alpha</hadoop.2.version>
99
    <hadoop.2.version>2.0.2-alpha</hadoop.2.version>
99
    <guava.version>11.0.2</guava.version>
100
    <guava.version>11.0.2</guava.version>
100
    <json-simple.version>1.1</json-simple.version>
101
    <json-simple.version>1.1</json-simple.version>
101
    <junit.version>4.9</junit.version>
102
    <junit.version>4.9</junit.version>
102
    <log4j.version>1.2.16</log4j.version>
103
    <log4j.version>1.2.16</log4j.version>
103
    <servlet.version>2.5</servlet.version>
104
    <servlet.version>2.5</servlet.version>

    
   
105
    <cargo.version>1.3.2</cargo.version>
104
  </properties>
106
  </properties>
105

    
   
107

   
106
  <dependencies>
108
  <dependencies>
107
    <dependency>
109
    <dependency>
108
      <groupId>log4j</groupId>
110
      <groupId>log4j</groupId>
[+20] [20] 15 lines
[+20]
124
        </property>
126
        </property>
125
      </activation>
127
      </activation>
126

    
   
128

   
127
      <dependencyManagement>
129
      <dependencyManagement>
128
        <dependencies>
130
        <dependencies>

    
   
131

   

    
   
132
          <dependency>

    
   
133
            <groupId>commons-io</groupId>

    
   
134
            <artifactId>commons-io</artifactId>

    
   
135
            <version>${commons-io.version}</version>

    
   
136
          </dependency>

    
   
137

   
129
          <dependency>
138
          <dependency>
130
            <groupId>com.google.guava</groupId>
139
            <groupId>com.google.guava</groupId>
131
            <artifactId>guava</artifactId>
140
            <artifactId>guava</artifactId>
132
            <version>${guava.version}</version>
141
            <version>${guava.version}</version>
133
          </dependency>
142
          </dependency>
134

    
   
143

   
135
          <dependency>
144
          <dependency>
136
            <groupId>org.apache.hadoop</groupId>
145
            <groupId>org.apache.hadoop</groupId>
137
            <artifactId>hadoop-core</artifactId>
146
            <artifactId>hadoop-core</artifactId>
138
            <version>${hadoop.1.version}</version>
147
            <version>${hadoop.1.version}</version>
139
            <scope>provided</scope>
148
            <scope>provided</scope>
140
          </dependency>
149
          </dependency>

    
   
150

   

    
   
151
          <dependency>

    
   
152
            <groupId>org.apache.hadoop</groupId>

    
   
153
            <artifactId>hadoop-test</artifactId>

    
   
154
            <version>${hadoop.1.version}</version>

    
   
155
          </dependency>

    
   
156

   
141
        </dependencies>
157
        </dependencies>
142
      </dependencyManagement>
158
      </dependencyManagement>
143
    </profile>
159
    </profile>
144

    
   
160

   
145
    <!-- Hadoop 2.x (active by default) -->
161
    <!-- Hadoop 2.x (active by default) -->
[+20] [20] 33 lines
[+20]
179
            <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
195
            <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
180
            <version>${hadoop.2.version}</version>
196
            <version>${hadoop.2.version}</version>
181
            <scope>provided</scope>
197
            <scope>provided</scope>
182
          </dependency>
198
          </dependency>
183

    
   
199

   

    
   
200
          <dependency>

    
   
201
            <groupId>org.apache.hadoop</groupId>

    
   
202
            <artifactId>hadoop-minicluster</artifactId>

    
   
203
            <version>${hadoop.2.version}</version>

    
   
204
          </dependency>

    
   
205

   
184
        </dependencies>
206
        </dependencies>
185
      </dependencyManagement>
207
      </dependencyManagement>
186
    </profile>
208
    </profile>
187

    
   
209

   
188
    <!-- Sign profile for releasing artifacts to Nexus repository -->
210
    <!-- Sign profile for releasing artifacts to Nexus repository -->
[+20] [20] 119 lines
[+20]
308
      <dependency>
330
      <dependency>
309
        <groupId>org.apache.derby</groupId>
331
        <groupId>org.apache.derby</groupId>
310
        <artifactId>derby</artifactId>
332
        <artifactId>derby</artifactId>
311
        <version>${derby.version}</version>
333
        <version>${derby.version}</version>
312
      </dependency>
334
      </dependency>

    
   
335
      <dependency>

    
   
336
        <groupId>org.codehaus.cargo</groupId>

    
   
337
        <artifactId>cargo-core-container-tomcat</artifactId>

    
   
338
        <version>${cargo.version}</version>

    
   
339
      </dependency>
313
   </dependencies>
340
   </dependencies>
314
  </dependencyManagement>
341
  </dependencyManagement>
315

    
   
342

   
316
  <modules>
343
  <modules>
317
    <module>common</module>
344
    <module>common</module>
[+20] [20] 5 lines
[+20]
323
    <module>docs</module>
350
    <module>docs</module>
324
    <module>connector</module>
351
    <module>connector</module>
325
    <module>execution</module>
352
    <module>execution</module>
326
    <module>submission</module>
353
    <module>submission</module>
327
    <module>dist</module>
354
    <module>dist</module>

    
   
355
    <module>test</module>
328
  </modules>
356
  </modules>
329

    
   
357

   
330
  <build>
358
  <build>
331
    <plugins>
359
    <plugins>
332
      <plugin>
360
      <plugin>
[+20] [20] 234 lines
test/pom.xml
New File
 
test/src/main/java/org/apache/sqoop/test/minicluster/InProcessSqoopMiniCluster.java
New File
 
test/src/main/java/org/apache/sqoop/test/minicluster/SqoopMiniCluster.java
New File
 
test/src/main/java/org/apache/sqoop/test/minicluster/TomcatSqoopMiniCluster.java
New File
 
test/src/test/java/org/apache/sqoop/integration/TomcatTestCase.java
New File
 
test/src/test/java/org/apache/sqoop/integration/server/VersionTest.java
New File
 
  1. pom.xml: Loading...
  2. test/pom.xml: Loading...
  3. test/src/main/java/org/apache/sqoop/test/minicluster/InProcessSqoopMiniCluster.java: Loading...
  4. test/src/main/java/org/apache/sqoop/test/minicluster/SqoopMiniCluster.java: Loading...
  5. test/src/main/java/org/apache/sqoop/test/minicluster/TomcatSqoopMiniCluster.java: Loading...
  6. test/src/test/java/org/apache/sqoop/integration/TomcatTestCase.java: Loading...
  7. test/src/test/java/org/apache/sqoop/integration/server/VersionTest.java: Loading...