> Please review this PR which converts _TestEncodingDecodingLength.java_ into a > whitebox test which allows for testing to be done without memory usage issues. > > Currently, the test requires about ~2.75 `Integer.MAX_VALUE` sized byte > arrays worth of memory. (2 for the initial array allocation, .75 for the > target array in `decode()`). While the `-Xms6g -Xmx8g` options should address > this, there have been intermittent memory issues, as the underlying machine > machine may be running other tests simultaneously. > > By converting this test to a white-box test not only does it get rid of > memory issues, but it also gets rid of the need to decode 2GB of data 3 > times. The change is done using reflection to test the private visibility > methods `encodedOutLength` and `decodedOutLength`, which the public `encode` > and `decode` overloaded methods call respectively.
Justin Lu has updated the pull request incrementally with one additional commit since the last revision: Reflect review comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19036/files - new: https://git.openjdk.org/jdk/pull/19036/files/6958ba5a..aa25c9a7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19036&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19036&range=00-01 Stats: 49 lines in 1 file changed: 20 ins; 7 del; 22 mod Patch: https://git.openjdk.org/jdk/pull/19036.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19036/head:pull/19036 PR: https://git.openjdk.org/jdk/pull/19036