diff --git a/bindings/java/src/net/hyperic/sigar/test/TestInvoker.java b/bindings/java/src/net/hyperic/sigar/test/TestInvoker.java index e9c3b4b6..a14a2b0c 100644 --- a/bindings/java/src/net/hyperic/sigar/test/TestInvoker.java +++ b/bindings/java/src/net/hyperic/sigar/test/TestInvoker.java @@ -1,6 +1,7 @@ package net.hyperic.sigar.test; import net.hyperic.sigar.Sigar; +import net.hyperic.sigar.SigarException; import net.hyperic.sigar.SigarLoader; import net.hyperic.sigar.SigarProxy; import net.hyperic.sigar.SigarProxyCache; @@ -28,6 +29,14 @@ public class TestInvoker extends SigarTestCase { { "sigar:Type=CpuPercList,Arg=0", "Idle" }, }; + private static final String[][] BROKEN_QUERIES = { + { "sigar:Type=BREAK", "Free" }, + { "sigar:Type=Mem", "BREAK" }, + { "sigar:Type=ProcTime,Arg=BREAK", "Stime" }, + { "sigar:Type=CpuPercList,Arg=1000", "Idle" }, + { "sigar:Type=CpuPercList,Arg=BREAK", "Idle" }, + }; + public TestInvoker(String name) { super(name); } @@ -56,8 +65,26 @@ public class TestInvoker extends SigarTestCase { */ continue; } - Object o = invoker.invoke(query[1]); - traceln(query[0] + ":" + query[1] + "=" + o); + try { + Object o = invoker.invoke(query[1]); + traceln(query[0] + ":" + query[1] + "=" + o); + assertTrue(true); + } catch (SigarException e) { + assertTrue(false); + } + } + + for (int i=0; i