You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rl...@apache.org on 2015/12/10 04:33:17 UTC

ambari git commit: AMBARI-14316. Ambari Server Unit Test failure on trunk (ClusterResourceProviderTest.testCreateResource_blueprint_With_ProvisionAction) (rlevas)

Repository: ambari
Updated Branches:
  refs/heads/trunk 3071857c3 -> 6b45ca82e


AMBARI-14316. Ambari Server Unit Test failure on trunk (ClusterResourceProviderTest.testCreateResource_blueprint_With_ProvisionAction) (rlevas)


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

Branch: refs/heads/trunk
Commit: 6b45ca82e5f5b4663fe04bbaf984ed6aadb74228
Parents: 3071857
Author: Robert Levas <rl...@hortonworks.com>
Authored: Wed Dec 9 22:31:00 2015 -0500
Committer: Robert Levas <rl...@hortonworks.com>
Committed: Wed Dec 9 22:31:00 2015 -0500

----------------------------------------------------------------------
 .../server/controller/internal/ClusterResourceProviderTest.java   | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6b45ca82/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java
index 0eb1e59..57cbebc 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java
@@ -156,6 +156,9 @@ public class ClusterResourceProviderTest {
     expect(requestStatusResponse.getRequestId()).andReturn(5150L).anyTimes();
 
     replayAll();
+
+    SecurityContextHolder.getContext().setAuthentication(TestAuthenticationFactory.createAdministrator());
+
     RequestStatus requestStatus = provider.createResources(request);
     assertEquals(5150L, requestStatus.getRequestResource().getPropertyValue(PropertyHelper.getPropertyId("Requests", "id")));
     assertEquals(Resource.Type.Request, requestStatus.getRequestResource().getType());