You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2022/09/13 08:50:54 UTC

[flink-connector-elasticsearch] 08/13: [FLINK-27209][build] Half the memory and double forkCount for running unit tests

This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-connector-elasticsearch.git

commit dd50bf075b16954b843c9f3f611ea7c7ff535c66
Author: Piotr Nowojski <pi...@gmail.com>
AuthorDate: Mon Sep 12 16:53:03 2022 +0200

     [FLINK-27209][build] Half the memory and double forkCount for running unit tests
---
 pom.xml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/pom.xml b/pom.xml
index 4a4a19c..859a2d6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -92,6 +92,13 @@ under the License.
 		<flink.convergence.phase>validate</flink.convergence.phase>
 		<test.randomization.seed/>
 		<test.unit.pattern>**/*Test.*</test.unit.pattern>
+
+		<flink.XmxITCase>2048m</flink.XmxITCase>
+		<flink.XmxUnitTest>1024m</flink.XmxUnitTest>
+		<!-- Number of forkCounts for ITCase and UnitTest should take into account allocated memory
+			 to the jvm (-Xmx) and the available memory on the machine running the test -->
+		<flink.forkCountITCase>2</flink.forkCountITCase>
+		<flink.forkCountUnitTest>4</flink.forkCountUnitTest>
 	</properties>
 
 	<dependencies>
@@ -945,6 +952,8 @@ under the License.
 							<includes>
 								<include>${test.unit.pattern}</include>
 							</includes>
+							<forkCount>${flink.forkCountUnitTest}</forkCount>
+							<argLine>-Xms256m -Xmx${flink.XmxUnitTest} -XX:+UseG1GC</argLine>
 						</configuration>
 					</execution>
 					<!--execute all the integration tests-->
@@ -964,6 +973,8 @@ under the License.
 								     e.g., 'org.apache.flink.api.scala.typeutils.Foo$Bar$Foobar'. -->
 								<exclude>**/*$*</exclude>
 							</excludes>
+							<forkCount>${flink.forkCountITCase}</forkCount>
+							<argLine>-Xms256m -Xmx${flink.XmxITCase} -XX:+UseG1GC</argLine>
 							<reuseForks>false</reuseForks>
 						</configuration>
 					</execution>