[crac] RFR: Fixing VMOptionsTest.java

Roman Marchenko rmarchenko at openjdk.org
Tue Jun 13 13:22:11 UTC 2023


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.

-------------

Commit messages:
 - Fixing test/jdk/jdk/crac/VMOptionsTest.java

Changes: https://git.openjdk.org/crac/pull/81/files
 Webrev: https://webrevs.openjdk.org/?repo=crac&pr=81&range=00
  Stats: 5 lines in 1 file changed: 2 ins; 1 del; 2 mod
  Patch: https://git.openjdk.org/crac/pull/81.diff
  Fetch: git fetch https://git.openjdk.org/crac.git pull/81/head:pull/81

PR: https://git.openjdk.org/crac/pull/81


More information about the crac-dev mailing list