On 2/27/14 11:43 AM, Mattias Tobiasson wrote:
Hi,
Could you please review this test fix.
The test verifies that MemoryPoolMXBean sends a notification when used memory
has reached the threshold.
The flag thresholdExceeded marks if we have reached the memory threshold. When
the flag is set, the test slows down to give time for the notification to be
received.
The problem is that thresholdExceeded is overwritten every time in the loop.
Instead it should be set if any pool has reached the threshold. This means that
the test continues to allocate memory at full speed, and we may get an
OutOfMemory before we get the notification.
Hi Mattias,
I wonder whether you should also stop calling loadNext() once
thresholdExceeded is true?
best regards,
-- daniel
bug:
https://bugs.openjdk.java.net/browse/JDK-8031065
webrev:
http://cr.openjdk.java.net/~ykantser/8031065/webrev.00/
Mattias