fixups
This commit is contained in:
parent
4fe5f84c59
commit
5b3c4c83db
|
@ -2,6 +2,7 @@ package net.hyperic.sigar.win32.test;
|
||||||
|
|
||||||
import net.hyperic.sigar.test.SigarTestCase;
|
import net.hyperic.sigar.test.SigarTestCase;
|
||||||
import net.hyperic.sigar.win32.Pdh;
|
import net.hyperic.sigar.win32.Pdh;
|
||||||
|
import net.hyperic.sigar.win32.Win32Exception;
|
||||||
|
|
||||||
public class TestPdh extends SigarTestCase {
|
public class TestPdh extends SigarTestCase {
|
||||||
|
|
||||||
|
@ -12,9 +13,9 @@ public class TestPdh extends SigarTestCase {
|
||||||
private void getValue(String key) throws Exception {
|
private void getValue(String key) throws Exception {
|
||||||
Pdh pdh = new Pdh();
|
Pdh pdh = new Pdh();
|
||||||
|
|
||||||
assertGtZeroTrace("raw..." + key,
|
assertGtEqZeroTrace("raw..." + key,
|
||||||
(long)pdh.getRawValue(key));
|
(long)pdh.getRawValue(key));
|
||||||
assertGtZeroTrace("fmt..." + key,
|
assertGtEqZeroTrace("fmt..." + key,
|
||||||
(long)pdh.getFormattedValue(key));
|
(long)pdh.getFormattedValue(key));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +27,16 @@ public class TestPdh extends SigarTestCase {
|
||||||
for (int i=0; i<keys.length; i++) {
|
for (int i=0; i<keys.length; i++) {
|
||||||
getValue(keys[i]);
|
getValue(keys[i]);
|
||||||
}
|
}
|
||||||
|
/* XXX hangs for a while on my XP box
|
||||||
|
String bogusKey = "\\Does Not\\Exist";
|
||||||
|
try {
|
||||||
|
new Pdh().getRawValue(bogusKey);
|
||||||
|
assertTrue(false);
|
||||||
|
} catch (Win32Exception e) {
|
||||||
|
assertTrue(true);
|
||||||
|
traceln(bogusKey + "=" + e.getMessage());
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testPdh () throws Exception {
|
public void testPdh () throws Exception {
|
||||||
|
|
Loading…
Reference in New Issue