pick e3e9ab0a6 gradle - use custom testng suite 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/31527a01 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/31527a01 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/31527a01 Branch: refs/heads/branch-2.5 Commit: 31527a01564d337986568e58d0d49122a5f952a4 Parents: 0987e5e Author: Lisnichenko Dmitro <[email protected]> Authored: Fri Jan 27 14:07:23 2017 +0200 Committer: Lisnichenko Dmitro <[email protected]> Committed: Fri Jan 27 14:07:23 2017 +0200 ---------------------------------------------------------------------- .../UpdateKerberosConfigsServerActionTest.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/31527a01/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 98b3f00..710f474 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; @@ -163,8 +163,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(); }
