Skip to content

Commit d1c53c1

Browse files
committed
Tune JVM options to avoid out of memory issues.
While running the tests locally I hit on OOM exceptions. This commit fixes the problem by enabling forking and removing unnecessary JVM options from the `.jvmopts` file. All tests pass now when I run `sbt tests/test` locally.
1 parent 5dd610d commit d1c53c1

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

.jvmopts

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
-Dfile.encoding=UTF8
22
-Xms1G
33
-Xmx3G
4-
-XX:MaxMetaspaceSize=512M
54
-XX:ReservedCodeCacheSize=250M
65
-XX:+TieredCompilation
76
-XX:-UseGCOverheadLimit

build.sbt

-4
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,6 @@ lazy val tests = project
217217
),
218218
scalacOptions ++= scalacJvmOptions.value,
219219
javaOptions += "-Dfile.encoding=UTF8",
220-
// Fork in CI to avoid memory limitation issues. Disable forking locally
221-
// because ScalaTest error reporting fails with cryptic serialization errors
222-
// when forking is enabled.
223-
fork := isCI,
224220
buildInfoPackage := "org.scalafmt.tests",
225221
buildInfoKeys := Seq[BuildInfoKey](
226222
"resourceDirectory" -> resourceDirectory.in(Test).value

0 commit comments

Comments
 (0)