You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@falcon.apache.org by so...@apache.org on 2015/10/08 22:54:03 UTC

falcon git commit: FALCON-1466 Flaky unit tests in Proxy user feature. Contributed by Sowmya Ramesh.

Repository: falcon
Updated Branches:
  refs/heads/master a267b46a7 -> 9a43bb643


FALCON-1466 Flaky unit tests in Proxy user feature. Contributed by Sowmya Ramesh.


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

Branch: refs/heads/master
Commit: 9a43bb643dbbe4d640952621dfdae81fcf18008f
Parents: a267b46
Author: Sowmya Ramesh <sr...@hortonworks.com>
Authored: Thu Oct 8 13:53:57 2015 -0700
Committer: Sowmya Ramesh <sr...@hortonworks.com>
Committed: Thu Oct 8 13:53:57 2015 -0700

----------------------------------------------------------------------
 CHANGES.txt                                                      | 2 ++
 .../main/java/org/apache/falcon/service/ProxyUserService.java    | 4 ++--
 .../src/main/java/org/apache/falcon/util/RuntimeProperties.java  | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/9a43bb64/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 1bc61b6..0d03d8a 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -55,6 +55,8 @@ Trunk (Unreleased)
     FALCON-1403 Revisit IT cleanup and teardown(Narayan Periwal via Pallavi Rao)
 
   BUG FIXES
+    FALCON-1466 Flaky unit tests in Proxy user feature(Sowmya Ramesh)
+
     FALCON-1518 Temporarily comment getTotalEnqueueCount in JMSMessageConsumerTest(Peeyush Bishnoi via Sowmya Ramesh)
 
     FALCON-1514 Incorrect logging while submitting cluster(Sandeep Samudrala via Pallavi Rao)

http://git-wip-us.apache.org/repos/asf/falcon/blob/9a43bb64/common/src/main/java/org/apache/falcon/service/ProxyUserService.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/falcon/service/ProxyUserService.java b/common/src/main/java/org/apache/falcon/service/ProxyUserService.java
index 0ad6663..364c750 100644
--- a/common/src/main/java/org/apache/falcon/service/ProxyUserService.java
+++ b/common/src/main/java/org/apache/falcon/service/ProxyUserService.java
@@ -79,7 +79,7 @@ public class ProxyUserService implements FalconService {
             if (key.startsWith(CONF_PREFIX) && key.endsWith(GROUPS)) {
                 String proxyUser = key.substring(0, key.lastIndexOf(GROUPS));
                 if (RuntimeProperties.get().getProperty(proxyUser + HOSTS) == null) {
-                    throw new FalconException(CONF_PREFIX + proxyUser + HOSTS + " property not set in runtime "
+                    throw new FalconException(proxyUser + HOSTS + " property not set in runtime "
                             + "properties. Please add it.");
                 }
                 proxyUser = proxyUser.substring(CONF_PREFIX.length());
@@ -94,7 +94,7 @@ public class ProxyUserService implements FalconService {
             if (key.startsWith(CONF_PREFIX) && key.endsWith(HOSTS)) {
                 String proxyUser = key.substring(0, key.lastIndexOf(HOSTS));
                 if (RuntimeProperties.get().getProperty(proxyUser + GROUPS) == null) {
-                    throw new FalconException(CONF_PREFIX + proxyUser + GROUPS + " property not set in runtime "
+                    throw new FalconException(proxyUser + GROUPS + " property not set in runtime "
                             + "properties. Please add it.");
                 }
                 proxyUser = proxyUser.substring(CONF_PREFIX.length());

http://git-wip-us.apache.org/repos/asf/falcon/blob/9a43bb64/common/src/main/java/org/apache/falcon/util/RuntimeProperties.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/falcon/util/RuntimeProperties.java b/common/src/main/java/org/apache/falcon/util/RuntimeProperties.java
index 3ff30ee..714a64d 100644
--- a/common/src/main/java/org/apache/falcon/util/RuntimeProperties.java
+++ b/common/src/main/java/org/apache/falcon/util/RuntimeProperties.java
@@ -93,6 +93,7 @@ public final class RuntimeProperties extends ApplicationProperties {
             long backOffDelay = REFRESH_DELAY;
             while (true) {
                 try {
+                    Thread.sleep(Math.min(MAX_ITER * REFRESH_DELAY, backOffDelay));
                     try {
                         RuntimeProperties newProperties = new RuntimeProperties();
                         newProperties.loadProperties();
@@ -103,7 +104,6 @@ public final class RuntimeProperties extends ApplicationProperties {
                         LOG.warn("Error refreshing runtime properties", e);
                         backOffDelay += REFRESH_DELAY;
                     }
-                    Thread.sleep(Math.min(MAX_ITER * REFRESH_DELAY, backOffDelay));
                 } catch (InterruptedException e) {
                     LOG.error("Application is stopping. Aborting...");
                     break;