mv ProcessQueryFactory.clear calls to tearDown()

This commit is contained in:
Doug MacEachern 2010-04-21 13:55:01 -07:00
parent 647f3d32c3
commit 8cd05ddc64
1 changed files with 9 additions and 3 deletions

View File

@ -116,9 +116,18 @@ public class TestPTQL extends SigarTestCase {
public TestPTQL(String name) { public TestPTQL(String name) {
super(name); super(name);
}
protected void setUp() throws Exception {
super.setUp();
this.qf = new ProcessQueryFactory(); this.qf = new ProcessQueryFactory();
} }
protected void tearDown() throws Exception {
super.tearDown();
this.qf.clear();
}
private int runQuery(Sigar sigar, String qs) private int runQuery(Sigar sigar, String qs)
throws MalformedQueryException, throws MalformedQueryException,
SigarException { SigarException {
@ -174,7 +183,6 @@ public class TestPTQL extends SigarTestCase {
assertTrue(qs, assertTrue(qs,
runQuery(sigar, qs) >= 0); runQuery(sigar, qs) >= 0);
} }
this.qf.clear();
} }
public void testValidRegexQueries() throws Exception { public void testValidRegexQueries() throws Exception {
@ -183,7 +191,6 @@ public class TestPTQL extends SigarTestCase {
assertTrue(qs, assertTrue(qs,
runQuery(getSigar(), qs) >= 0); runQuery(getSigar(), qs) >= 0);
} }
this.qf.clear();
} }
public void testMalformedQueries() throws Exception { public void testMalformedQueries() throws Exception {
@ -197,7 +204,6 @@ public class TestPTQL extends SigarTestCase {
assertTrue(qs + " Malformed", true); assertTrue(qs + " Malformed", true);
} }
} }
this.qf.clear();
} }
public void testSelf() throws Exception { public void testSelf() throws Exception {