}
private void testOK(SigarProxy proxy) throws Exception {
for (int i=0; i<OK_QUERIES.length; i++) {
String[] query = OK_QUERIES[i];
SigarInvokerJMX invoker =
SigarInvokerJMX.getInstance(proxy, query[0]);
try {
Object o = invoker.invoke(query[1]);
traceln(query[0] + ":" + query[1] + "=" + o);
assertTrue(true);
} catch (SigarNotImplementedException e) {
traceln(query[0] + " NotImplemented");
} catch (SigarPermissionDeniedException e) {
traceln(query[0] + " PermissionDenied");
} catch (SigarException e) {
traceln(query[0] + ":" + query[1] + "=" + e);
assertTrue(false);
}
}
for (int i=0; i<BROKEN_QUERIES.length; i++) {
String[] query = BROKEN_QUERIES[i];
SigarInvokerJMX invoker =
SigarInvokerJMX.getInstance(proxy, query[0]);
try {
invoker.invoke(query[1]);
assertTrue(false);
} catch (SigarException e) {
traceln(query[0] + ":" + query[1] + "=" + e.getMessage());
assertTrue(true);
}