getFileSystemUsage for all fs types

This commit is contained in:
Doug MacEachern 2004-12-05 22:36:54 +00:00
parent d7adfbd94a
commit 136f564d4b
1 changed files with 4 additions and 4 deletions

View File

@ -31,11 +31,11 @@ public class TestFileSystem extends SigarTestCase {
assertLengthTrace("TypeName", fs.getTypeName());
assertLengthTrace("SysTypeName", fs.getSysTypeName());
FileSystemUsage usage =
sigar.getFileSystemUsage(fs.getDirName());
switch (fs.getType()) {
case FileSystem.TYPE_LOCAL_DISK:
FileSystemUsage usage =
sigar.getFileSystemUsage(fs.getDirName());
assertGtZeroTrace(" Total", usage.getTotal());
//possible machines have full filesystems
assertGtEqZeroTrace(" Free", usage.getFree());
@ -43,9 +43,9 @@ public class TestFileSystem extends SigarTestCase {
double usePercent = usage.getUsePercent() * 100;
traceln(" Used=" + usePercent + "%");
assertTrue(usePercent <= 100.0);
default:
traceln(" DiskReads=" + usage.getDiskReads());
traceln(" DiskWrites=" + usage.getDiskWrites());
break;
}
}