|
143 | 143 | <groupId>org.apache.maven.plugins</groupId> |
144 | 144 | <artifactId>maven-surefire-plugin</artifactId> |
145 | 145 | <configuration> |
| 146 | + <argLine>${maven-surefire-plugin.argLine}</argLine> |
146 | 147 | <parallel>classes</parallel> |
147 | 148 | <threadCount>1</threadCount> |
148 | 149 | <perCoreThreadCount>true</perCoreThreadCount> |
|
190 | 191 | </plugin> |
191 | 192 | </plugins> |
192 | 193 | </build> |
| 194 | + |
| 195 | + <profiles> |
| 196 | + <profile> |
| 197 | + <id>parallel-tests</id> |
| 198 | + <build> |
| 199 | + <plugins> |
| 200 | + <plugin> |
| 201 | + <groupId>org.apache.hadoop</groupId> |
| 202 | + <artifactId>hadoop-maven-plugins</artifactId> |
| 203 | + <executions> |
| 204 | + <execution> |
| 205 | + <id>parallel-tests-createdir</id> |
| 206 | + <goals> |
| 207 | + <goal>parallel-tests-createdir</goal> |
| 208 | + </goals> |
| 209 | + </execution> |
| 210 | + </executions> |
| 211 | + </plugin> |
| 212 | + <plugin> |
| 213 | + <groupId>org.apache.maven.plugins</groupId> |
| 214 | + <artifactId>maven-surefire-plugin</artifactId> |
| 215 | + <configuration> |
| 216 | + <forkCount>${testsThreadCount}</forkCount> |
| 217 | + <reuseForks>false</reuseForks> |
| 218 | + <argLine>${maven-surefire-plugin.argLine}</argLine> |
| 219 | + <systemPropertyVariables> |
| 220 | + <testsThreadCount>${testsThreadCount}</testsThreadCount> |
| 221 | + <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data> |
| 222 | + <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir> |
| 223 | + <hadoop.tmp.dir>${project.build.directory}/test/${surefire.forkNumber}</hadoop.tmp.dir> |
| 224 | + <!-- This is intentionally the same directory for all JUnit --> |
| 225 | + <!-- forks, for use in the very rare situation that --> |
| 226 | + <!-- concurrent tests need to coordinate, such as using lock --> |
| 227 | + <!-- files. --> |
| 228 | + <test.build.shared.data>${test.build.data}</test.build.shared.data> |
| 229 | + |
| 230 | + <!-- Due to a Maven quirk, setting this to just --> |
| 231 | + <!-- surefire.forkNumber won't do the parameter substitution. --> |
| 232 | + <!-- Putting a prefix in front of it like "fork-" makes it --> |
| 233 | + <!-- work. --> |
| 234 | + <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id> |
| 235 | + </systemPropertyVariables> |
| 236 | + </configuration> |
| 237 | + </plugin> |
| 238 | + </plugins> |
| 239 | + </build> |
| 240 | + </profile> |
| 241 | + </profiles> |
193 | 242 | </project> |
0 commit comments