168169170171172173174175176177178
notification = (MonitorNotification)holder.get(); assertEquals(notification.getType(), MonitorNotification.THRESHOLD_HIGH_VALUE_EXCEEDED); } finally { monitor.stop(); } } /** * This also serves as a test case for bug #742554
267268269270271272273274275276277
assertEquals(times.get(), 0); assertNull(holder.get()); } finally { monitor.stop(); } } /** * This also serves as a test case for bug #822849
305306307308309310311312313314315
Number observed = monitor.getDerivedGauge(name); assertEquals(observed.intValue(), gauge); } finally { monitor.stop(); } } public interface MonitorTargetMBean {
527528529530531532533534535536537
echo("\tKO: GaugeMonitor notification missed or not emitted"); return 1; } } finally { if (gaugeMonitor != null) gaugeMonitor.stop(); } return 0; }
216217218219220221222223224225226
return 1; } } finally { messageReceived = false; if (gaugeMonitor != null) gaugeMonitor.stop(); } return 0; }
249250251252253254255256257258259
System.err.println(attr+": [" + mon2n+ "] DerivedGauge is now "+ server.getAttribute(mon2n, "DerivedGauge")); } finally { try {mon1.stop();} catch (Exception x) {} try {mon2.stop();} catch (Exception x) {} } }
217218219220221222223224225226227