From 8cd05ddc640d56cec1d46bcd957bc56621278c16 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Wed, 21 Apr 2010 13:55:01 -0700 Subject: [PATCH] mv ProcessQueryFactory.clear calls to tearDown() --- .../java/src/org/hyperic/sigar/test/TestPTQL.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bindings/java/src/org/hyperic/sigar/test/TestPTQL.java b/bindings/java/src/org/hyperic/sigar/test/TestPTQL.java index 7f504169..067c5461 100644 --- a/bindings/java/src/org/hyperic/sigar/test/TestPTQL.java +++ b/bindings/java/src/org/hyperic/sigar/test/TestPTQL.java @@ -116,9 +116,18 @@ public class TestPTQL extends SigarTestCase { public TestPTQL(String name) { super(name); + } + + protected void setUp() throws Exception { + super.setUp(); this.qf = new ProcessQueryFactory(); } + protected void tearDown() throws Exception { + super.tearDown(); + this.qf.clear(); + } + private int runQuery(Sigar sigar, String qs) throws MalformedQueryException, SigarException { @@ -174,7 +183,6 @@ public class TestPTQL extends SigarTestCase { assertTrue(qs, runQuery(sigar, qs) >= 0); } - this.qf.clear(); } public void testValidRegexQueries() throws Exception { @@ -183,7 +191,6 @@ public class TestPTQL extends SigarTestCase { assertTrue(qs, runQuery(getSigar(), qs) >= 0); } - this.qf.clear(); } public void testMalformedQueries() throws Exception { @@ -197,7 +204,6 @@ public class TestPTQL extends SigarTestCase { assertTrue(qs + " Malformed", true); } } - this.qf.clear(); } public void testSelf() throws Exception {