clear ProcessQueryFactory and Humidor instances on shutdown

This commit is contained in:
Doug MacEachern 2010-04-21 13:56:25 -07:00
parent 8cd05ddc64
commit a5dacd4d03
1 changed files with 4 additions and 0 deletions

View File

@ -27,7 +27,9 @@ import java.util.Properties;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.hyperic.sigar.Humidor;
import org.hyperic.sigar.Sigar; import org.hyperic.sigar.Sigar;
import org.hyperic.sigar.ptql.ProcessQueryFactory;
//helper to add optional tracing. //helper to add optional tracing.
public abstract class SigarTestCase extends TestCase { public abstract class SigarTestCase extends TestCase {
@ -80,6 +82,8 @@ public abstract class SigarTestCase extends TestCase {
sigar.close(); sigar.close();
sigar = null; sigar = null;
} }
ProcessQueryFactory.getInstance().clear();
Humidor.getInstance().close();
} }
public Properties getProperties() { public Properties getProperties() {