Commit a7e4327
committed
Run Surefire tests in a forked JVM so -Xmx2g actually applies
The default and coverage profiles set forkCount=0, which makes Surefire
run tests inside Maven's own JVM. argLine — including the -Xmx2g heap
limit — is only applied to a forked test JVM, so under forkCount=0 it
was silently ignored and tests used whatever heap MAVEN_OPTS gave the
build process. This worked locally (developer Macs have plenty of
headroom) but caused recurring OutOfMemoryError on the GitHub-hosted
macOS runner, which has tighter RAM than the Linux/Windows runners.
Switch both profiles to forkCount=1 + reuseForks=true so the heap
limit is honored on every platform, with negligible (~1–2 s) fork
startup overhead.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Increase Maven Surefire heap size to 4GB for testing1 parent f47a04d commit a7e4327
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
260 | 264 | | |
261 | 265 | | |
262 | 266 | | |
263 | 267 | | |
264 | 268 | | |
265 | 269 | | |
266 | | - | |
| 270 | + | |
| 271 | + | |
267 | 272 | | |
268 | 273 | | |
269 | 274 | | |
| |||
275 | 280 | | |
276 | 281 | | |
277 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
278 | 286 | | |
279 | 287 | | |
280 | 288 | | |
281 | 289 | | |
282 | 290 | | |
283 | 291 | | |
| 292 | + | |
| 293 | + | |
284 | 294 | | |
285 | 295 | | |
286 | 296 | | |
| |||
0 commit comments