On Mon, 22 Jan 2024 15:03:18 GMT, Severin Gehwolf <sgehw...@openjdk.org> wrote:
> `1k` increments for a total of `512k` times seems overkill. Are you sure > that's needed to make the test pass? How about `1MB` increments for a total > of `512` times? When the docker serivice work normally on the test machine, this test will always fail. This test want to verify the API `jdk.internal.platform.Metrics.systemMetrics().getMemoryFailCount()` work normally or not. The API return memory allocate fail times in jvm. But, before this PR, everytime it allocate `1M` memory, the API has no chance the catch the memory allocate fail, the jvm was killed by OOM. Change `8M` increments to `1K` mean to avoid OOM killed for the jvm in docker container. jvm was killed by OOM in docker container:  `1M` Increnents also can avoid OOM killed.  ------------- PR Comment: https://git.openjdk.org/jdk/pull/17514#issuecomment-1905139487