Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 0987e5ee1 -> 31527a015
  refs/heads/trunk 16c0b68e6 -> cc30798a6


AMBARI-19741. Ambari Server Unit Test failure on branch-2.5/trunk for 
testUpdateConfigForceSecurityEnabled (echekanskiy via dlysnichenko)


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

Branch: refs/heads/trunk
Commit: cc30798a6f1428fbe2a2dd6c64cac2c128cf9a23
Parents: 16c0b68
Author: Lisnichenko Dmitro <dlysniche...@hortonworks.com>
Authored: Fri Jan 27 14:06:49 2017 +0200
Committer: Lisnichenko Dmitro <dlysniche...@hortonworks.com>
Committed: Fri Jan 27 14:06:49 2017 +0200

----------------------------------------------------------------------
 .../UpdateKerberosConfigsServerActionTest.java        | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cc30798a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
index e756491..c8ebb63 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
@@ -22,7 +22,7 @@ import static org.easymock.EasyMock.anyObject;
 import static org.easymock.EasyMock.capture;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.expectLastCall;
-import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import java.io.File;
 import java.util.Collection;
@@ -43,7 +43,6 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
-
 import com.google.inject.AbstractModule;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
@@ -165,8 +164,15 @@ public class UpdateKerberosConfigsServerActionTest extends 
EasyMockSupport{
     action.setExecutionCommand(executionCommand);
     action.execute(null);
 
-    assertEquals(configTypes.getValue(), "cluster-env");
-    assertEquals(configUpdates.getValue().get("security_enabled"), "false");
+    assertTrue(configTypes.getValues().contains("cluster-env"));
+    boolean containsSecurityEnabled = false;
+    for(Map<String, String> properties: configUpdates.getValues()) {
+      if(properties.containsKey("security_enabled")) {
+        containsSecurityEnabled = true;
+        break;
+      }
+    }
+    assertTrue(containsSecurityEnabled);
     verifyAll();
   }
 

Reply via email to