This is an automated email from the ASF dual-hosted git repository.
yubiao pushed a commit to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.10 by this push:
new a19879ba17b [Build] Make the test JVM exit if OOME occurs (#14509)
a19879ba17b is described below
commit a19879ba17b10df45913540a031edef77cd483b9
Author: Lari Hotari <[email protected]>
AuthorDate: Tue Mar 1 16:17:55 2022 +0200
[Build] Make the test JVM exit if OOME occurs (#14509)
- OOMEs can make the build to take very long to complete.
It's better to fail fast in tests when OOMEs occur.
(cherry picked from commit 89a36f9e4a0cd37676b7501184004f01a7c47150)
---
pom.xml | 2 +-
.../org/apache/pulsar/client/api/ClientDeduplicationFailureTest.java | 3 ++-
tests/bc_2_0_0/pom.xml | 2 +-
tests/bc_2_0_1/pom.xml | 2 +-
tests/bc_2_6_0/pom.xml | 2 +-
tests/integration/pom.xml | 2 +-
tests/pulsar-client-admin-shade-test/pom.xml | 2 +-
tests/pulsar-client-all-shade-test/pom.xml | 2 +-
tests/pulsar-client-shade-test/pom.xml | 2 +-
9 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/pom.xml b/pom.xml
index d7bf95e5f3b..69adebd4df3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1433,7 +1433,7 @@ flexible messaging model and an intuitive client
API.</description>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>${testJacocoAgentArgument} -Xmx1G -XX:+UseG1GC
+ <argLine>${testJacocoAgentArgument} -XX:+ExitOnOutOfMemoryError
-Xmx1G -XX:+UseG1GC
-Dpulsar.allocator.pooled=true
-Dpulsar.allocator.leak_detection=Advanced
-Dpulsar.allocator.exit_on_oom=false
diff --git
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/ClientDeduplicationFailureTest.java
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/ClientDeduplicationFailureTest.java
index 2ddb9e8c8a3..c8325908c6c 100644
---
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/ClientDeduplicationFailureTest.java
+++
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/ClientDeduplicationFailureTest.java
@@ -189,7 +189,8 @@ public class ClientDeduplicationFailureTest {
}
}
- @Test(timeOut = 300000, groups = "quarantine")
+ // TODO: Test disabled since it results in a OOME
+ @Test(timeOut = 300000, groups = "quarantine", enabled = false)
public void testClientDeduplicationCorrectnessWithFailure() throws
Exception {
final String namespacePortion = "dedup";
final String replNamespace = tenant + "/" + namespacePortion;
diff --git a/tests/bc_2_0_0/pom.xml b/tests/bc_2_0_0/pom.xml
index 7b30d525049..ca27ce43ead 100644
--- a/tests/bc_2_0_0/pom.xml
+++ b/tests/bc_2_0_0/pom.xml
@@ -91,7 +91,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>${testJacocoAgentArgument} -Xmx2G
-XX:MaxDirectMemorySize=8G
+ <argLine>${testJacocoAgentArgument}
-XX:+ExitOnOutOfMemoryError -Xmx2G -XX:MaxDirectMemorySize=8G
-Dio.netty.leakDetectionLevel=advanced
${test.additional.args}
</argLine>
diff --git a/tests/bc_2_0_1/pom.xml b/tests/bc_2_0_1/pom.xml
index d0b04207cb5..44c69a45940 100644
--- a/tests/bc_2_0_1/pom.xml
+++ b/tests/bc_2_0_1/pom.xml
@@ -91,7 +91,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>${testJacocoAgentArgument} -Xmx2G
-XX:MaxDirectMemorySize=8G
+ <argLine>${testJacocoAgentArgument}
-XX:+ExitOnOutOfMemoryError -Xmx2G -XX:MaxDirectMemorySize=8G
-Dio.netty.leakDetectionLevel=advanced
${test.additional.args}
</argLine>
diff --git a/tests/bc_2_6_0/pom.xml b/tests/bc_2_6_0/pom.xml
index 28c2724113a..18848cf4349 100644
--- a/tests/bc_2_6_0/pom.xml
+++ b/tests/bc_2_6_0/pom.xml
@@ -98,7 +98,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>${testJacocoAgentArgument} -Xmx2G
-XX:MaxDirectMemorySize=8G
+ <argLine>${testJacocoAgentArgument}
-XX:+ExitOnOutOfMemoryError -Xmx2G -XX:MaxDirectMemorySize=8G
-Dio.netty.leakDetectionLevel=advanced
${test.additional.args}
</argLine>
diff --git a/tests/integration/pom.xml b/tests/integration/pom.xml
index b6f399a647c..ebd1d9dae02 100644
--- a/tests/integration/pom.xml
+++ b/tests/integration/pom.xml
@@ -233,7 +233,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>${testJacocoAgentArgument} -Xmx1G
-XX:MaxDirectMemorySize=1G
+ <argLine>${testJacocoAgentArgument} -XX:+ExitOnOutOfMemoryError
-Xmx1G -XX:MaxDirectMemorySize=1G
-Dio.netty.leakDetectionLevel=advanced
${test.additional.args}
</argLine>
diff --git a/tests/pulsar-client-admin-shade-test/pom.xml
b/tests/pulsar-client-admin-shade-test/pom.xml
index e6bda70f45e..aecc699ef2d 100644
--- a/tests/pulsar-client-admin-shade-test/pom.xml
+++ b/tests/pulsar-client-admin-shade-test/pom.xml
@@ -106,7 +106,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>${testJacocoAgentArgument} -Xmx2G
-XX:MaxDirectMemorySize=8G
+ <argLine>${testJacocoAgentArgument}
-XX:+ExitOnOutOfMemoryError -Xmx2G -XX:MaxDirectMemorySize=8G
-Dio.netty.leakDetectionLevel=advanced
${test.additional.args}
</argLine>
diff --git a/tests/pulsar-client-all-shade-test/pom.xml
b/tests/pulsar-client-all-shade-test/pom.xml
index 3d4cfbbcf1f..163cda06c62 100644
--- a/tests/pulsar-client-all-shade-test/pom.xml
+++ b/tests/pulsar-client-all-shade-test/pom.xml
@@ -105,7 +105,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>${testJacocoAgentArgument} -Xmx2G
-XX:MaxDirectMemorySize=8G
+ <argLine>${testJacocoAgentArgument}
-XX:+ExitOnOutOfMemoryError -Xmx2G -XX:MaxDirectMemorySize=8G
-Dio.netty.leakDetectionLevel=advanced
${test.additional.args}
</argLine>
diff --git a/tests/pulsar-client-shade-test/pom.xml
b/tests/pulsar-client-shade-test/pom.xml
index bf298f83695..e7995001ad4 100644
--- a/tests/pulsar-client-shade-test/pom.xml
+++ b/tests/pulsar-client-shade-test/pom.xml
@@ -100,7 +100,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>${testJacocoAgentArgument} -Xmx2G
-XX:MaxDirectMemorySize=8G
+ <argLine>${testJacocoAgentArgument}
-XX:+ExitOnOutOfMemoryError -Xmx2G -XX:MaxDirectMemorySize=8G
-Dio.netty.leakDetectionLevel=advanced
${test.additional.args}
</argLine>