[crac] RFR: Fixing VMOptionsTest.java

Radim Vansa duke at openjdk.org
Tue Jun 13 15:02:14 UTC 2023

On Tue, 13 Jun 2023 14:12:28 GMT, Roman Marchenko <rmarchenko at openjdk.org> wrote:

>> test/jdk/jdk/crac/VMOptionsTest.java fails in debug build because it expects that NativeMemoryTracking equals to"off", that is not true in debug build.
>> Exception in thread "main" java.lang.RuntimeException: assertEquals: expected off to equal summary
>>     at jdk.test.lib.Asserts.fail(Asserts.java:594)
>>     at jdk.test.lib.Asserts.assertEquals(Asserts.java:205)
>>     at jdk.test.lib.Asserts.assertEquals(Asserts.java:189)
>>     at VMOptionsTest.exec(VMOptionsTest.java:60)
>>     at jdk.test.lib.crac.CracTest.run(CracTest.java:155)
>>     at jdk.test.lib.crac.CracTest.main(CracTest.java:87)
>> This change fixes the issue by retrieving NMT value before checkpoint, and comparing later.
> @rvansa Could you review please?

Hi @wkia , the PR looks correct, but I wonder if we need to complicate things if the NMT default is not the same in different builds. I've picked this simply as a random specimen of the non-manageable opts (with string args); could you just use something else, e.g. `OnOutOfMemoryError`, or if you want to go with non-empty default there's `MetaspaceReclaimPolicy`?


PR Comment: https://git.openjdk.org/crac/pull/81#issuecomment-1589485965

More information about the crac-dev mailing list