David Holmes wrote:
shanliang wrote:
Daniel Fuchs wrote:
On 9/23/13 8:27 PM, shanliang wrote:
Hi,

Please review this test fix, if the test continues failing, then we need
to investigate the Monitor implementation.

webrev: http://cr.openjdk.java.net/~sjiang/JDK-8025207/00/
bug: https://bugs.openjdk.java.net/browse/JDK-8025207

Thanks,
Shanliang


Hi Shanliang,

There seems to an issue in the exit condition of the loop in the
new code.

The old code had:

150  if (derivedGaugeValue.intValue() != derivedGauge[i])

the new code has:

155  } while (derivedGaugeValue.intValue() != counter[i]);
Good catch, I changed the code, even they are same today:
Here is the new version:
    http://cr.openjdk.java.net/~sjiang/JDK-8025207/01/

My concern here is that if the test times out and is killed by the test harness, there is absolutely nothing to indicate where the test got stuck. So I would suggest at least adding a println before entering the loop and again after.
I think today the test gives info about each test step:
Line 139:
   System.out.println("\nStart monitoring...");
tells the looping entry

Line 146:
   System.out.println("\nCounter = " + mbean.getCounter());
within the loop tells which counter value is being tested.

Line 156:
   System.out.println("Threshold = " + thresholdValue);
within the loop tells the test end of a count value.

Line 168:
   System.out.println("\nStop monitoring...");
tells the looping end.

and the class Listener prints out notification info allowing to know where is testing too.

Thanks,
Shanliang

David
-----

Reply via email to