phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mujt...@apache.org
Subject phoenix git commit: PHOENIX-2309 Fix unit test hang for Pherf on Mac
Date Wed, 07 Oct 2015 18:02:23 GMT
Repository: phoenix
Updated Branches:
  refs/heads/master 0f10d3f6a -> 9fa160d39


PHOENIX-2309 Fix unit test hang for Pherf on Mac


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/9fa160d3
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/9fa160d3
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/9fa160d3

Branch: refs/heads/master
Commit: 9fa160d39afb1012eef3a1e8361bb389ef8a4e90
Parents: 0f10d3f
Author: Mujtaba <mujtaba@apache.org>
Authored: Wed Oct 7 11:02:20 2015 -0700
Committer: Mujtaba <mujtaba@apache.org>
Committed: Wed Oct 7 11:02:20 2015 -0700

----------------------------------------------------------------------
 .../test/java/org/apache/phoenix/pherf/ResultTest.java | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/9fa160d3/phoenix-pherf/src/test/java/org/apache/phoenix/pherf/ResultTest.java
----------------------------------------------------------------------
diff --git a/phoenix-pherf/src/test/java/org/apache/phoenix/pherf/ResultTest.java b/phoenix-pherf/src/test/java/org/apache/phoenix/pherf/ResultTest.java
index 81d5fd0..e543137 100644
--- a/phoenix-pherf/src/test/java/org/apache/phoenix/pherf/ResultTest.java
+++ b/phoenix-pherf/src/test/java/org/apache/phoenix/pherf/ResultTest.java
@@ -26,14 +26,12 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
 
 import org.apache.phoenix.pherf.jmx.MonitorManager;
-
 import org.apache.phoenix.pherf.result.file.Extension;
 import org.apache.phoenix.pherf.result.file.ResultFileDetails;
 import org.apache.phoenix.pherf.result.impl.CSVFileResultHandler;
 import org.apache.phoenix.pherf.result.impl.XMLResultHandler;
 import org.apache.phoenix.pherf.result.*;
 import org.junit.Test;
-
 import org.apache.phoenix.pherf.configuration.Query;
 
 public class ResultTest extends ResultBaseTest {
@@ -110,8 +108,11 @@ public class ResultTest extends ResultBaseTest {
     @Test
     public void testResult() throws Exception {
         String filename = "testresult";
-        ResultHandler xmlResultHandler = null;
-        ResultManager resultManager = new ResultManager(filename);
+        ResultHandler xmlResultHandler = new XMLResultHandler();
+        xmlResultHandler.setResultFileDetails(ResultFileDetails.XML);
+        xmlResultHandler.setResultFileName(filename);
+
+        ResultManager resultManager = new ResultManager(filename, Arrays.asList(xmlResultHandler));
         assertTrue("Default Handlers were not initialized.", resultManager.getResultHandlers().size()
> 0);
 
         // write result to file
@@ -125,10 +126,6 @@ public class ResultTest extends ResultBaseTest {
         resultManager.write(modelResults);
 
         // read result from file
-        xmlResultHandler = new XMLResultHandler();
-        xmlResultHandler.setResultFileDetails(ResultFileDetails.XML);
-        xmlResultHandler.setResultFileName(filename);
-
         List<Result> resultList = xmlResultHandler.read();
         ResultValue<DataModelResult> resultValue = resultList.get(0).getResultValues().get(0);
         DataModelResult dataModelResultFromFile = resultValue.getResultValue();


Mime
View raw message