falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rostafiyc...@apache.org
Subject incubator-falcon git commit: FALCON-926 Fix problems found by findbugs in merlin and merlin-core. Contributed by Raghav Kumar Gautam and Ruslan Ostafiychuk
Date Mon, 01 Dec 2014 13:50:41 GMT
Repository: incubator-falcon
Updated Branches:
  refs/heads/master 972607f9a -> 8be06f3ba


FALCON-926 Fix problems found by findbugs in merlin and merlin-core. Contributed by Raghav
Kumar Gautam and Ruslan Ostafiychuk


Project: http://git-wip-us.apache.org/repos/asf/incubator-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-falcon/commit/8be06f3b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-falcon/tree/8be06f3b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-falcon/diff/8be06f3b

Branch: refs/heads/master
Commit: 8be06f3bab687eb81fe69e08becb11d79f5a2c3b
Parents: 972607f
Author: Ruslan Ostafiychuk <rostafiychuk@apache.org>
Authored: Mon Dec 1 14:37:13 2014 +0200
Committer: Ruslan Ostafiychuk <rostafiychuk@apache.org>
Committed: Mon Dec 1 15:48:44 2014 +0200

----------------------------------------------------------------------
 falcon-regression/CHANGES.txt                   |  3 +++
 .../regression/core/helpers/LineageHelper.java  | 16 ++++----------
 .../core/response/ServiceResponse.java          | 14 ++-----------
 .../core/supportClasses/HadoopFileEditor.java   |  2 +-
 .../falcon/regression/core/util/ExecUtil.java   |  6 ++++--
 .../falcon/regression/core/util/HadoopUtil.java | 22 ++++++--------------
 .../regression/core/util/InstanceUtil.java      | 16 ++++----------
 .../falcon/regression/core/util/TimeUtil.java   |  1 -
 .../org/apache/falcon/request/BaseRequest.java  |  4 +++-
 .../regression/testHelper/BaseTestClass.java    | 10 ++-------
 .../regression/testHelper/BaseUITestClass.java  |  6 +++---
 .../prism/FeedDelayParallelTimeoutTest.java     |  4 ++--
 .../prism/PrismProcessDeleteTest.java           |  2 +-
 .../falcon/regression/ui/LineageGraphTest.java  | 12 +++++------
 .../falcon/regression/ui/ProcessUITest.java     |  4 ++--
 15 files changed, 43 insertions(+), 79 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/8be06f3b/falcon-regression/CHANGES.txt
----------------------------------------------------------------------
diff --git a/falcon-regression/CHANGES.txt b/falcon-regression/CHANGES.txt
index 16b839d..09cd3b5 100644
--- a/falcon-regression/CHANGES.txt
+++ b/falcon-regression/CHANGES.txt
@@ -33,6 +33,9 @@ Trunk (Unreleased)
    via Samarth Gupta)
 
   IMPROVEMENTS
+   FALCON-926 Fix problems found by findbugs in merlin and merlin-core (Ruslan Ostafiychuk
and
+   Raghav Kumar Gautam via Ruslan Ostafiychuk)
+
    FALCON-698 Fix checkstyle bugs in test files in falcon-regression (Ruslan Ostafiychuk
and
    Raghav Kumar Gautam via Ruslan Ostafiychuk)
 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/8be06f3b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/helpers/LineageHelper.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/helpers/LineageHelper.java
b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/helpers/LineageHelper.java
index 3e4fc26..12464be 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/helpers/LineageHelper.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/helpers/LineageHelper.java
@@ -19,6 +19,7 @@
 package org.apache.falcon.regression.core.helpers;
 
 import com.google.gson.GsonBuilder;
+import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.falcon.regression.core.response.lineage.Direction;
 import org.apache.falcon.regression.core.response.lineage.EdgeResult;
@@ -36,9 +37,7 @@ import org.apache.http.HttpResponse;
 import org.apache.log4j.Logger;
 import org.testng.Assert;
 
-import java.io.BufferedReader;
 import java.io.IOException;
-import java.io.InputStreamReader;
 import java.net.URISyntaxException;
 import java.util.EnumSet;
 import java.util.Map;
@@ -96,14 +95,7 @@ public class LineageHelper {
      * @throws IOException
      */
     public String getResponseString(HttpResponse response) throws IOException {
-        BufferedReader reader = new BufferedReader(
-                new InputStreamReader(response.getEntity().getContent(), "UTF-8"));
-        StringBuilder sb = new StringBuilder();
-        String line;
-        while((line = reader.readLine()) != null){
-            sb.append(line).append("\n");
-        }
-        return sb.toString();
+        return IOUtils.toString(response.getEntity().getContent(), "UTF-8");
     }
 
     /**
@@ -155,8 +147,8 @@ public class LineageHelper {
         if (paramPairs != null && paramPairs.size() > 0) {
             String[] params = new String[paramPairs.size()];
             int i = 0;
-            for (String key : paramPairs.keySet()) {
-                params[i++] = key + '=' + paramPairs.get(key);
+            for (Map.Entry<String, String> entry : paramPairs.entrySet()) {
+                params[i++] = entry.getKey() + '=' + entry.getValue();
             }
             return hostAndPath + "/?" + StringUtils.join(params, "&");
         }

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/8be06f3b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/ServiceResponse.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/ServiceResponse.java
b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/ServiceResponse.java
index 8bcadbc..175bb98 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/ServiceResponse.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/ServiceResponse.java
@@ -18,6 +18,7 @@
 
 package org.apache.falcon.regression.core.response;
 
+import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.falcon.regression.core.util.Util;
 import org.apache.falcon.resource.EntityList;
@@ -28,9 +29,7 @@ import org.apache.log4j.Logger;
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBException;
 import javax.xml.bind.Unmarshaller;
-import java.io.BufferedReader;
 import java.io.IOException;
-import java.io.InputStreamReader;
 import java.io.StringReader;
 
 /** Class to represent falcon's response to a rest request. */
@@ -71,16 +70,7 @@ public class ServiceResponse {
     }
 
     public ServiceResponse(HttpResponse response) throws IOException {
-        BufferedReader reader =
-            new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
-
-        String line;
-        StringBuilder stringResponse = new StringBuilder();
-
-        while ((line = reader.readLine()) != null) {
-            stringResponse.append(line);
-        }
-        this.message = stringResponse.toString();
+        this.message = IOUtils.toString(response.getEntity().getContent());
         this.code = response.getStatusLine().getStatusCode();
         this.response = response;
 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/8be06f3b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/supportClasses/HadoopFileEditor.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/supportClasses/HadoopFileEditor.java
b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/supportClasses/HadoopFileEditor.java
index c544e51..32f50dc 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/supportClasses/HadoopFileEditor.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/supportClasses/HadoopFileEditor.java
@@ -86,7 +86,7 @@ public class HadoopFileEditor {
             fs.delete(file, false);
             File crcFile = new File("." + currentFile + ".crc");
             if (crcFile.exists()) {
-                crcFile.delete();
+                LOGGER.info("Result of delete on crcFile" + crcFile + " : " + crcFile.delete());
             }
             fs.copyFromLocalFile(new Path(currentFile), file);
         } else {

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/8be06f3b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/ExecUtil.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/ExecUtil.java
b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/ExecUtil.java
index 8dcb202..82c8919 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/ExecUtil.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/ExecUtil.java
@@ -27,6 +27,7 @@ import org.apache.commons.exec.CommandLine;
 import org.apache.commons.exec.DefaultExecutor;
 import org.apache.commons.exec.ExecuteWatchdog;
 import org.apache.commons.exec.PumpStreamHandler;
+import org.apache.commons.io.IOUtils;
 import org.apache.falcon.regression.core.supportClasses.ExecResult;
 import org.apache.log4j.Logger;
 import org.testng.Assert;
@@ -129,10 +130,11 @@ public final class ExecUtil {
             TimeUtil.sleepSeconds(1);
         }
 
-        in.close();
+        IOUtils.closeQuietly(r);
+        IOUtils.closeQuietly(in);
         channel.disconnect();
         session.disconnect();
-        out.close();
+        IOUtils.closeQuietly(out);
         return data;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/8be06f3b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/HadoopUtil.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/HadoopUtil.java
b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/HadoopUtil.java
index bd2aaf6..3cb4f94 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/HadoopUtil.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/HadoopUtil.java
@@ -18,6 +18,7 @@
 
 package org.apache.falcon.regression.core.util;
 
+import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
@@ -26,7 +27,6 @@ import org.apache.log4j.Logger;
 
 import java.io.File;
 import java.io.FileNotFoundException;
-import java.io.FileWriter;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -339,22 +339,12 @@ public final class HadoopUtil {
     public static void copyDataToFolders(FileSystem fs, final String folderPrefix,
         List<String> folderList, String... fileLocations) throws IOException {
         for (final String folder : folderList) {
-            boolean r;
             String folderSpace = folder.replaceAll("/", "_");
-            File f = new File(OSUtil.NORMAL_INPUT + folderSpace + ".txt");
-            if (!f.exists()) {
-                r = f.createNewFile();
-                if (!r) {
-                    LOGGER.info("file could not be created");
-                }
-            }
-            FileWriter fr = new FileWriter(f);
-            fr.append("folder");
-            fr.close();
-            fs.copyFromLocalFile(new Path(f.getAbsolutePath()), new Path(folderPrefix + folder));
-            r = f.delete();
-            if (!r) {
-                LOGGER.info("delete was not successful");
+            File file = new File(OSUtil.NORMAL_INPUT + folderSpace + ".txt");
+            FileUtils.writeStringToFile(file, "folder", true);
+            fs.copyFromLocalFile(new Path(file.getAbsolutePath()), new Path(folderPrefix
+ folder));
+            if (!file.delete()) {
+                LOGGER.info("delete was not successful for file: " + file);
             }
             Path[] srcPaths = new Path[fileLocations.length];
             for (int i = 0; i < srcPaths.length; ++i) {

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/8be06f3b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java
b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java
index 1b70faa..ede5cee 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java
@@ -23,6 +23,7 @@ import com.google.gson.JsonDeserializationContext;
 import com.google.gson.JsonDeserializer;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonSyntaxException;
+import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.falcon.entity.v0.EntityType;
@@ -65,9 +66,7 @@ import org.apache.oozie.client.WorkflowJob;
 import org.joda.time.DateTime;
 import org.testng.Assert;
 
-import java.io.BufferedReader;
 import java.io.IOException;
-import java.io.InputStreamReader;
 import java.lang.reflect.Type;
 import java.net.URISyntaxException;
 import java.util.ArrayList;
@@ -104,14 +103,7 @@ public final class InstanceUtil {
             IOException, AuthenticationException, InterruptedException {
         BaseRequest request = new BaseRequest(url, method, user);
         HttpResponse response = request.run();
-        BufferedReader reader = new BufferedReader(
-                new InputStreamReader(response.getEntity().getContent(), "UTF-8"));
-        StringBuilder stringResponse = new StringBuilder();
-        String line;
-        while ((line = reader.readLine()) != null) {
-            stringResponse.append(line).append("\n");
-        }
-        String responseString = stringResponse.toString();
+        String responseString = IOUtils.toString(response.getEntity().getContent(), "UTF-8");
         LOGGER.info("The web service response is:\n" + Util.prettyPrintXmlOrJson(responseString));
         APIResult result;
         if (url.contains("/summary/")) {
@@ -537,8 +529,8 @@ public final class InstanceUtil {
             LOGGER.info("Key = " + entry.getKey() + ", Value = " + entry.getValue());
         }
         int i = 0;
-        for (Integer key : bundleMap.keySet()) {
-            bundleID = bundleMap.get(key);
+        for (Map.Entry<Integer, String> entry : bundleMap.entrySet()) {
+            bundleID = entry.getValue();
             if (i == bundleNumber) {
                 return bundleID;
             }

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/8be06f3b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/TimeUtil.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/TimeUtil.java
b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/TimeUtil.java
index 7df4595..8157b7f 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/TimeUtil.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/TimeUtil.java
@@ -205,7 +205,6 @@ public final class TimeUtil {
         DateTime finalDate = new DateTime(oozieDateToDate(startTimeOfLateCoord));
         while (true) {
             DateTime sysDate = oozieDateToDate(getTimeWrtSystemTime(0));
-            sysDate.withZoneRetainFields(DateTimeZone.UTC);
             LOGGER.info("sysDate: " + sysDate + "  finalDate: " + finalDate);
             if (sysDate.compareTo(finalDate) > 0) {
                 break;

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/8be06f3b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/request/BaseRequest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/request/BaseRequest.java
b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/request/BaseRequest.java
index d32e8ed..0fc01ef 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/request/BaseRequest.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/request/BaseRequest.java
@@ -128,8 +128,10 @@ public class BaseRequest {
             request = new HttpPost(new URI(this.url));
         } else if (this.method.equalsIgnoreCase("put")) {
             request = new HttpPut(new URI(this.url));
+        } else {
+            throw new IOException("Unknown method: " + method);
         }
-        if (this.requestData != null && request != null) {
+        if (this.requestData != null) {
             request.setEntity(new StringEntity(requestData));
         }
         return execute(request);

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/8be06f3b/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/testHelper/BaseTestClass.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/testHelper/BaseTestClass.java
b/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/testHelper/BaseTestClass.java
index 7bb5a36..49bdf03 100644
--- a/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/testHelper/BaseTestClass.java
+++ b/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/testHelper/BaseTestClass.java
@@ -39,12 +39,7 @@ public class BaseTestClass {
     private static final Logger LOGGER = Logger.getLogger(BaseTestClass.class);
 
     static {
-        try {
-            prepareProperties();
-        } catch (Exception e) {
-            LOGGER.error(e.getMessage());  //To change body of catch statement use
-            System.exit(1);
-        }
+        prepareProperties();
     }
 
     protected ColoHelper prism;
@@ -68,8 +63,7 @@ public class BaseTestClass {
                 serverFS.add(server.getClusterHelper().getHadoopFS());
                 serverOC.add(server.getClusterHelper().getOozieClient());
             } catch (IOException e) {
-                e.printStackTrace();
-                System.exit(1);
+                throw new RuntimeException(e);
             }
         }
         bundles = new Bundle[serverNames.length];

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/8be06f3b/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/testHelper/BaseUITestClass.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/testHelper/BaseUITestClass.java
b/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/testHelper/BaseUITestClass.java
index 96514c2..caa9a38 100644
--- a/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/testHelper/BaseUITestClass.java
+++ b/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/testHelper/BaseUITestClass.java
@@ -27,13 +27,13 @@ import org.openqa.selenium.firefox.FirefoxProfile;
  */
 public class BaseUITestClass extends BaseTestClass{
 
-    protected static WebDriver driver;
+    private static WebDriver driver;
 
     public static WebDriver getDriver() {
         return driver;
     }
 
-    protected void openBrowser() {
+    protected static void openBrowser() {
 
         FirefoxProfile profile = new FirefoxProfile();
         profile.setPreference("network.negotiate-auth.trusted-uris", "http://, https://");
@@ -44,7 +44,7 @@ public class BaseUITestClass extends BaseTestClass{
     }
 
 
-    public void closeBrowser() {
+    public static void closeBrowser() {
         if (driver != null) {
             driver.close();
             driver.quit();

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/8be06f3b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/FeedDelayParallelTimeoutTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/FeedDelayParallelTimeoutTest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/FeedDelayParallelTimeoutTest.java
index c35cbac..4ffc64f 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/FeedDelayParallelTimeoutTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/FeedDelayParallelTimeoutTest.java
@@ -93,12 +93,12 @@ public class FeedDelayParallelTimeoutTest extends BaseTestClass {
 
         // uncomment below 2 line when falcon in sync with ivory
 
-        //	feedOutput01 = instanceUtil.setFeedCluster(feedOutput01,
+        // feedOutput01 = instanceUtil.setFeedCluster(feedOutput01,
         // XmlUtil.createValidity("2013-04-21T00:00Z",
         // "2099-10-01T12:10Z"),XmlUtil.createRetention("hours(15)",ActionType.DELETE),
         // Util.readClusterName(bundles[1].getClusters().get(0)),ClusterType.SOURCE,"",delay,
         // feedInputPath);
-        //	feedOutput01 = instanceUtil.setFeedCluster(feedOutput01,
+        // feedOutput01 = instanceUtil.setFeedCluster(feedOutput01,
         // XmlUtil.createValidity("2013-04-21T00:00Z",
         // "2099-10-01T12:25Z"),XmlUtil.createRetention("hours(15)",ActionType.DELETE),
         // Util.readClusterName(bundles[0].getClusters().get(0)),ClusterType.TARGET,"",delay,

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/8be06f3b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismProcessDeleteTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismProcessDeleteTest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismProcessDeleteTest.java
index 99f3acc..3291d6d 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismProcessDeleteTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismProcessDeleteTest.java
@@ -76,7 +76,7 @@ public class PrismProcessDeleteTest extends BaseTestClass {
         removeBundles();
     }
 
-	/* NOTE: All test cases assume that there are two entities scheduled in each colo
+    /* NOTE: All test cases assume that there are two entities scheduled in each colo
         PrismProcessDeleteTest.testUA1ProcessDeleteAlreadyDeletedProcess */
     @Test(groups = {"prism", "0.2"})
     public void testUA1ProcessDeleteInBothColos() throws Exception {

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/8be06f3b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ui/LineageGraphTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ui/LineageGraphTest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ui/LineageGraphTest.java
index 74743cc..51fcb8d 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ui/LineageGraphTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ui/LineageGraphTest.java
@@ -138,7 +138,7 @@ public class LineageGraphTest extends BaseUITestClass {
     @Test
     public void testGraphVertices() {
 
-        ProcessPage processPage = new ProcessPage(driver, cluster, processName);
+        ProcessPage processPage = new ProcessPage(getDriver(), cluster, processName);
         processPage.navigateTo();
         for (Vertex piVertex : piVertices) {
             String nominalTime = piVertex.getNominalTime();
@@ -186,7 +186,7 @@ public class LineageGraphTest extends BaseUITestClass {
     public void testVerticesInfo()
         throws JAXBException, URISyntaxException, AuthenticationException, IOException {
         String clusterName = Util.readEntityName(bundles[0].getClusters().get(0));
-        ProcessPage processPage = new ProcessPage(driver, cluster, processName);
+        ProcessPage processPage = new ProcessPage(getDriver(), cluster, processName);
         processPage.navigateTo();
         for (Vertex piVertex : piVertices) {
             String nominalTime = piVertex.getNominalTime();
@@ -230,7 +230,7 @@ public class LineageGraphTest extends BaseUITestClass {
         expectedDescriptions.put("lineage-legend-feed-inst", "Feed instance");
         expectedDescriptions.put("lineage-legend-feed-inst lineage-legend-terminal",
             "Feed instance (terminal)");
-        ProcessPage processPage = new ProcessPage(driver, prism, processName);
+        ProcessPage processPage = new ProcessPage(getDriver(), prism, processName);
         processPage.navigateTo();
         for (Vertex piVertex : piVertices) {
             String nominalTime = piVertex.getNominalTime();
@@ -255,7 +255,7 @@ public class LineageGraphTest extends BaseUITestClass {
      */
     @Test
     public void testTerminals() {
-        ProcessPage processPage = new ProcessPage(driver, prism, processName);
+        ProcessPage processPage = new ProcessPage(getDriver(), prism, processName);
         processPage.navigateTo();
         lineageHelper = new LineageHelper(prism);
         VerticesResult processResult = lineageHelper.getVerticesByName(processName);
@@ -290,7 +290,7 @@ public class LineageGraphTest extends BaseUITestClass {
      */
     @Test
     public void testEdges() {
-        ProcessPage processPage = new ProcessPage(driver, prism, processName);
+        ProcessPage processPage = new ProcessPage(getDriver(), prism, processName);
         processPage.navigateTo();
         for (Vertex piVertex : piVertices) {
             String nominalTime = piVertex.getNominalTime();
@@ -341,7 +341,7 @@ public class LineageGraphTest extends BaseUITestClass {
      */
     @Test
     public void testLineageOpenClose() {
-        ProcessPage processPage = new ProcessPage(driver, prism, processName);
+        ProcessPage processPage = new ProcessPage(getDriver(), prism, processName);
         processPage.navigateTo();
         List<String> previous = new ArrayList<String>();
         for (Vertex piVertex : piVertices) {

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/8be06f3b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ui/ProcessUITest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ui/ProcessUITest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ui/ProcessUITest.java
index 2fa302e..d62d82e 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ui/ProcessUITest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ui/ProcessUITest.java
@@ -177,7 +177,7 @@ public class ProcessUITest extends BaseUITestClass {
         OozieClientException, InterruptedException {
 
         //check Process statuses via UI
-        EntitiesPage page = new EntitiesPage(driver, cluster, EntityType.PROCESS);
+        EntitiesPage page = new EntitiesPage(getDriver(), cluster, EntityType.PROCESS);
         page.navigateTo();
         String process = bundles[0].getProcessData();
         String processName = Util.readEntityName(process);
@@ -191,7 +191,7 @@ public class ProcessUITest extends BaseUITestClass {
         softAssert.assertEquals(page.getEntityStatus(processName),
                 EntitiesPage.EntityStatus.RUNNING, "Process status should be RUNNING");
 
-        ProcessPage processPage = new ProcessPage(driver, cluster, processName);
+        ProcessPage processPage = new ProcessPage(getDriver(), cluster, processName);
         processPage.navigateTo();
 
         String bundleID = InstanceUtil.getLatestBundleID(cluster, processName, EntityType.PROCESS);


Mime
View raw message