Skip to content

Commit 3f1dc7d

Browse files
authored
HADOOP-19726. [JDK17] Add JDK 17 compile options for maven-surefire-plugin in hadoop-tos module. (#8029) Contributed by Shilun Fan
* HADOOP-19726. [JDK17] Add JDK 17 compile options for maven-surefire-plugin in hadoop-tos module. Reviewed-by: Steve Loughran <[email protected]> Reviewed-by: lijinglun <[email protected]> Signed-off-by: Shilun Fan <[email protected]>
1 parent b429c79 commit 3f1dc7d

File tree

1 file changed

+49
-0
lines changed
  • hadoop-cloud-storage-project/hadoop-tos

1 file changed

+49
-0
lines changed

hadoop-cloud-storage-project/hadoop-tos/pom.xml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@
143143
<groupId>org.apache.maven.plugins</groupId>
144144
<artifactId>maven-surefire-plugin</artifactId>
145145
<configuration>
146+
<argLine>${maven-surefire-plugin.argLine}</argLine>
146147
<parallel>classes</parallel>
147148
<threadCount>1</threadCount>
148149
<perCoreThreadCount>true</perCoreThreadCount>
@@ -190,4 +191,52 @@
190191
</plugin>
191192
</plugins>
192193
</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>
193242
</project>

0 commit comments

Comments
 (0)