Skip to content

Commit 6c0962f

Browse files
authored
Merge pull request #847 from ravinperera00/issue_44124
Add `-XX:+ExitOnOutOfMemoryError` flag
2 parents aaf51c0 + 80b770d commit 6c0962f

25 files changed

+47
-45
lines changed

ballerina/Ballerina.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
org = "ballerina"
33
name = "cloud"
4-
version = "3.3.2"
4+
version = "3.3.3"
55
repository = "https://github.com/ballerina-platform/module-ballerina-c2c"
66
license = ["Apache-2.0"]
77
keywords = ["cloud", "kubernetes", "docker", "k8s", "c2c"]

ballerina/CompilerPlugin.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ id = "code2cloud"
33
class = "io.ballerina.c2c.C2CCompilerPlugin"
44

55
[[dependency]]
6-
path = "../compiler-plugin/build/libs/cloud-compiler-plugin-3.3.2.jar"
6+
path = "../compiler-plugin/build/libs/cloud-compiler-plugin-3.3.3-SNAPSHOT.jar"

ballerina/Dependencies.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ distribution-version = "2201.12.0"
1010
[[package]]
1111
org = "ballerina"
1212
name = "cloud"
13-
version = "3.3.2"
13+
version = "3.3.3"
1414
modules = [
1515
{org = "ballerina", packageName = "cloud", moduleName = "cloud"}
1616
]

compiler-plugin-tests/src/test/java/io/ballerina/c2c/test/ComplexPackageNameTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ public void validateDockerImage() {
126126
Assert.assertEquals(ports.get(0), "9090/tcp");
127127
// Validate ballerina.conf in run command
128128
Assert.assertEquals(getEntryPoint(DOCKER_IMAGE).toString(),
129-
"[java, -Xdiag, -cp, anjana-testObservation_0.1.5-0.1.0.jar:jars/*, " +
129+
"[java, -XX:+ExitOnOutOfMemoryError, -Xdiag, -cp, " +
130+
"anjana-testObservation_0.1.5-0.1.0.jar:jars/*, " +
130131
"anjana.testObservation_0&00461&00465.0.$_init]");
131132
}
132133

compiler-plugin-tests/src/test/java/io/ballerina/c2c/test/MixedConfigJobTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ public void validateDockerfile() {
157157

158158
@Test
159159
public void validateDockerImage() {
160-
Assert.assertEquals(getEntryPoint(DOCKER_IMAGE).toString(), "[java, -Xdiag, -cp," +
161-
" anjana-mix_configs_job-0.1.0.jar:jars/*, anjana.mix_configs_job.0.$_init]");
160+
Assert.assertEquals(getEntryPoint(DOCKER_IMAGE).toString(), "[java, -XX:+ExitOnOutOfMemoryError, " +
161+
"-Xdiag, -cp, anjana-mix_configs_job-0.1.0.jar:jars/*, anjana.mix_configs_job.0.$_init]");
162162
}
163163

164164
@AfterClass

compiler-plugin-tests/src/test/java/io/ballerina/c2c/test/MixedConfigTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ public void validateDockerImage() {
170170
Assert.assertEquals(ports.size(), 1);
171171
Assert.assertEquals(ports.get(0), "9090/tcp");
172172
// Validate ballerina.conf in run command
173-
Assert.assertEquals(getEntryPoint(DOCKER_IMAGE).toString(), "[java, -Xdiag, -cp, " +
174-
"anjana-mix_configs-0.1.0.jar:jars/*, anjana.mix_configs.0.$_init]");
173+
Assert.assertEquals(getEntryPoint(DOCKER_IMAGE).toString(), "[java, -XX:+ExitOnOutOfMemoryError, " +
174+
"-Xdiag, -cp, anjana-mix_configs-0.1.0.jar:jars/*, anjana.mix_configs.0.$_init]");
175175
}
176176

177177
@AfterClass

compiler-plugin-tests/src/test/java/io/ballerina/c2c/test/MultipleConfigTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ public void validateDockerImage() {
144144
Assert.assertEquals(ports.size(), 1);
145145
Assert.assertEquals(ports.get(0), "9090/tcp");
146146
// Validate ballerina.conf in run command
147-
Assert.assertEquals(getEntryPoint(DOCKER_IMAGE).toString(), "[java, -Xdiag, -cp, " +
148-
"hello-hello-0.0.1.jar:jars/*, hello.hello.0.$_init]");
147+
Assert.assertEquals(getEntryPoint(DOCKER_IMAGE).toString(), "[java, -XX:+ExitOnOutOfMemoryError, " +
148+
"-Xdiag, -cp, hello-hello-0.0.1.jar:jars/*, hello.hello.0.$_init]");
149149
}
150150

151151
@AfterClass

compiler-plugin-tests/src/test/java/io/ballerina/c2c/test/SettingsFatJarTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public void validateDockerImage() {
5757
Assert.assertEquals(ports.size(), 1);
5858
Assert.assertEquals(ports.get(0), "9090/tcp");
5959
// Validate ballerina.conf in run command
60-
Assert.assertEquals(getEntryPoint(DOCKER_IMAGE).toString(), "[java, -Xdiag, -cp," +
61-
" anjana-fat_jar-0.1.0.jar:jars/*, anjana.fat_jar.0.$_init]");
60+
Assert.assertEquals(getEntryPoint(DOCKER_IMAGE).toString(), "[java, -XX:+ExitOnOutOfMemoryError, " +
61+
"-Xdiag, -cp, anjana-fat_jar-0.1.0.jar:jars/*, anjana.fat_jar.0.$_init]");
6262
}
6363

6464
@AfterClass

compiler-plugin-tests/src/test/java/io/ballerina/c2c/test/choreo/PlainMainTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ public void validateChoreoYaml() throws IOException {
7373
public void validateDockerfile() throws IOException {
7474
File dockerFile = DOCKER_TARGET_PATH.resolve("Dockerfile").toFile();
7575
String dockerFileContent = new String(Files.readAllBytes(dockerFile.toPath()));
76-
Assert.assertTrue(dockerFileContent.contains("ENTRYPOINT [\"java\",\"-Xdiag\",\"-cp\"," +
77-
"\"hello-hello-0.0.1.jar:jars/*\",\"hello.hello.0.$_init\"]"));
76+
Assert.assertTrue(dockerFileContent.contains("ENTRYPOINT [\"java\",\"-XX:+ExitOnOutOfMemoryError\"," +
77+
"\"-Xdiag\",\"-cp\",\"hello-hello-0.0.1.jar:jars/*\",\"hello.hello.0.$_init\"]"));
7878
Assert.assertTrue(dockerFileContent.contains("USER ballerina"));
7979
Assert.assertTrue(dockerFile.exists());
8080
}

compiler-plugin-tests/src/test/java/io/ballerina/c2c/test/choreo/PlainServiceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ public void validateChoreoYaml() throws IOException {
7777
public void validateDockerfile() throws IOException {
7878
File dockerFile = DOCKER_TARGET_PATH.resolve("Dockerfile").toFile();
7979
String dockerFileContent = new String(Files.readAllBytes(dockerFile.toPath()));
80-
Assert.assertTrue(dockerFileContent.contains("ENTRYPOINT [\"java\",\"-Xdiag\",\"-cp\"," +
81-
"\"hello-hello-0.0.1.jar:jars/*\",\"hello.hello.0.$_init\"]"));
80+
Assert.assertTrue(dockerFileContent.contains("ENTRYPOINT [\"java\",\"-XX:+ExitOnOutOfMemoryError\"," +
81+
"\"-Xdiag\",\"-cp\",\"hello-hello-0.0.1.jar:jars/*\",\"hello.hello.0.$_init\"]"));
8282
Assert.assertTrue(dockerFileContent.contains("USER ballerina"));
8383
Assert.assertTrue(dockerFile.exists());
8484
}

0 commit comments

Comments
 (0)