use getSigar method.

rid traceln("").
This commit is contained in:
Doug MacEachern committed 2004-07-06 01:21:03 +00:00
1 parent ede1876709
commit 14f719659d
16 files changed
+14 -37

No files matched your search

@@ -26,8 +26,6 @@ public class TestCpu extends SigarTestCase {
Cpu cpu = sigar.getCpu();
traceln("");
traceln("getCpu:");
checkCpu(cpu);
@@ -13,14 +13,13 @@ public class TestCpuInfo extends SigarTestCase {
}
public void testCreate() throws Exception {
Sigar sigar = new Sigar();
Sigar sigar = getSigar();
CpuInfo[] infos = sigar.getCpuInfoList();
for (int i=0; i<infos.length; i++) {
CpuInfo info = infos[i];
traceln("");
traceln("num=" + i);
traceln("vendor=" + info.getVendor());
traceln("model=" + info.getModel());
@@ -26,9 +26,8 @@ public class TestFQDN extends SigarTestCase {
}
}
String fqdn = new Sigar().getFQDN();
String fqdn = getSigar().getFQDN();
traceln("");
traceln("fqdn=" + fqdn);
boolean validFQDN = fqdn.indexOf(".") > 0;
@@ -80,9 +80,7 @@ public class TestFileInfo extends SigarTestCase {
}
public void testCreate() throws Exception {
Sigar sigar = new Sigar();
traceln("");
Sigar sigar = getSigar();
String file;
File dir = new File(System.getProperty("user.dir"));
@@ -13,7 +13,7 @@ public class TestFileSystem extends SigarTestCase {
}
public void testCreate() throws Exception {
Sigar sigar = new Sigar();
Sigar sigar = getSigar();
FileSystem[] fslist = sigar.getFileSystemList();
FileSystemMap mounts = sigar.getFileSystemMap();
@@ -25,7 +25,6 @@ public class TestFileSystem extends SigarTestCase {
for (int i=0; i<fslist.length; i++) {
FileSystem fs = fslist[i];
traceln("");
assertTrue(mounts.getFileSystem(fs.getDirName()) != null);
assertLengthTrace("DevName", fs.getDevName());
assertLengthTrace("DirName", fs.getDirName());
@@ -47,8 +47,6 @@ public class TestInvoker extends SigarTestCase {
SigarProxy proxy =
SigarProxyCache.newInstance(sigar);
traceln("");
testOK(proxy);
}
@@ -10,13 +10,13 @@ public class TestLoadAverage extends SigarTestCase {
}
public void testCreate() throws Exception {
Sigar sigar = new Sigar();
Sigar sigar = getSigar();
try {
double[] loadavg = sigar.getLoadAverage();
assertTrue(loadavg.length == 3);
traceln("");
traceln("1min=" + loadavg[0]);
traceln("5min=" + loadavg[1]);
traceln("15min=" + loadavg[2]);
@@ -10,12 +10,10 @@ public class TestMem extends SigarTestCase {
}
public void testCreate() throws Exception {
Sigar sigar = new Sigar();
Sigar sigar = getSigar();
Mem mem = sigar.getMem();
traceln("");
assertGtZeroTrace("Total", mem.getTotal());
assertGtZeroTrace("Used", mem.getUsed());
@@ -21,7 +21,6 @@ public class TestNetIf extends SigarTestCase {
NetInterfaceConfig ifconfig =
sigar.getNetInterfaceConfig(name);
traceln("");
traceln("name=" + name);
assertTrueTrace("Address", ifconfig.getAddress());
@@ -72,7 +71,7 @@ public class TestNetIf extends SigarTestCase {
}
public void testCreate() throws Exception {
Sigar sigar = new Sigar();
Sigar sigar = getSigar();
/* call twice to make sure caching works */
getNetIflist(sigar, false);
@@ -136,7 +136,6 @@ public class TestPTQL extends SigarTestCase {
public void testCreate() throws Exception {
SigarProxy proxy = SynchronizedSigarProxyCache.getInstance();
traceln("");
testOK(proxy);
testMalformed(proxy);
testLoadFailure(proxy);
@@ -26,9 +26,7 @@ public class TestProcArgs extends SigarTestCase {
}
public void testCreate() throws Exception {
Sigar sigar = new Sigar();
traceln("");
Sigar sigar = getSigar();
try {
String[] args = sigar.getProcArgs(sigar.getPid());
@@ -13,10 +13,9 @@ public class TestProcEnv extends SigarTestCase {
}
public void testCreate() throws Exception {
Sigar sigar = new Sigar();
Sigar sigar = getSigar();
long pid = sigar.getPid();
traceln("");
try {
Map env = sigar.getProcEnv(pid);
@@ -13,9 +13,7 @@ public class TestProcExe extends SigarTestCase {
}
public void testCreate() throws Exception {
Sigar sigar = new Sigar();
traceln("");
Sigar sigar = getSigar();
try {
ProcExe exe = sigar.getProcExe(sigar.getPid());
@@ -14,9 +14,7 @@ public class TestProcFd extends SigarTestCase {
}
public void testCreate() throws Exception {
Sigar sigar = new Sigar();
traceln("");
Sigar sigar = getSigar();
try {
long pid = sigar.getPid();
@@ -11,9 +11,8 @@ public class TestProcList extends SigarTestCase {
}
public void testCreate() throws Exception {
Sigar sigar = new Sigar();
Sigar sigar = getSigar();
traceln("");
ArrayList traceList = new ArrayList();
long[] pids = sigar.getProcList();
@@ -28,9 +28,7 @@ public class TestProcModules extends SigarTestCase {
}
public void testCreate() throws Exception {
Sigar sigar = new Sigar();
traceln("");
Sigar sigar = getSigar();
try {
printModules(sigar, sigar.getPid());