ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpapirkovs...@apache.org
Subject [1/2] ambari git commit: AMBARI-20743. Prototype server websocket endpoint with STOMP sub-protocol. (mpapirkovskyy)
Date Thu, 13 Apr 2017 09:16:22 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-3.0-perf 6b76fc902 -> a98a8a25a


http://git-wip-us.apache.org/repos/asf/ambari/blob/a98a8a25/ambari-server/src/main/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosAuthenticationFilter.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosAuthenticationFilter.java
b/ambari-server/src/main/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosAuthenticationFilter.java
index 1b001ec..f0ee646 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosAuthenticationFilter.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosAuthenticationFilter.java
@@ -42,6 +42,7 @@ import org.springframework.security.kerberos.web.authentication.SpnegoAuthentica
 import org.springframework.security.web.AuthenticationEntryPoint;
 import org.springframework.security.web.authentication.AuthenticationFailureHandler;
 import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
+import org.springframework.stereotype.Component;
 
 /**
  * AmbariKerberosAuthenticationFilter extends the {@link SpnegoAuthenticationProcessingFilter}
class
@@ -49,6 +50,7 @@ import org.springframework.security.web.authentication.AuthenticationSuccessHand
  * <p>
  * If configured, auditing is performed using {@link AuditLogger}.
  */
+@Component
 public class AmbariKerberosAuthenticationFilter extends SpnegoAuthenticationProcessingFilter
implements AmbariAuthenticationFilter {
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/a98a8a25/ambari-server/src/main/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosTicketValidator.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosTicketValidator.java
b/ambari-server/src/main/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosTicketValidator.java
index bb57108..eb71328 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosTicketValidator.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosTicketValidator.java
@@ -26,6 +26,7 @@ import org.springframework.security.authentication.BadCredentialsException;
 import org.springframework.security.kerberos.authentication.KerberosTicketValidation;
 import org.springframework.security.kerberos.authentication.KerberosTicketValidator;
 import org.springframework.security.kerberos.authentication.sun.SunJaasKerberosTicketValidator;
+import org.springframework.stereotype.Component;
 
 /**
  * AmbariKerberosTicketValidator is a {@link KerberosTicketValidator} implementation that
delegates
@@ -37,6 +38,7 @@ import org.springframework.security.kerberos.authentication.sun.SunJaasKerberosT
  * <li>{@link SunJaasKerberosTicketValidator#setKeyTabLocation(Resource)} using the
Ambari server property from {@link Configuration#KERBEROS_AUTH_SPNEGO_KEYTAB_FILE}</li>
  * </ul>
  */
+@Component
 public class AmbariKerberosTicketValidator implements KerberosTicketValidator, InitializingBean
{
 
   private final SunJaasKerberosTicketValidator kerberosTicketValidator;

http://git-wip-us.apache.org/repos/asf/ambari/blob/a98a8a25/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java
b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java
index ce9a790..19bcd3e 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilter.java
@@ -51,7 +51,9 @@ import org.springframework.security.core.Authentication;
 import org.springframework.security.core.GrantedAuthority;
 import org.springframework.security.core.context.SecurityContext;
 import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.stereotype.Component;
 
+@Component
 public class AmbariAuthorizationFilter implements Filter {
   private static final String REALM_PARAM = "realm";
   private static final String DEFAULT_REALM = "AuthFilter";

http://git-wip-us.apache.org/repos/asf/ambari/blob/a98a8a25/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariUserAuthentication.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariUserAuthentication.java
b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariUserAuthentication.java
index ebcbdca..992f9c9 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariUserAuthentication.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariUserAuthentication.java
@@ -21,6 +21,8 @@ import java.util.Collection;
 
 import org.springframework.security.core.Authentication;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
 public class AmbariUserAuthentication implements Authentication, UserIdAuthentication {
 
   private String serializedToken;
@@ -35,6 +37,7 @@ public class AmbariUserAuthentication implements Authentication, UserIdAuthentic
   }
 
   @Override
+  @JsonIgnore
   public Collection<? extends AmbariGrantedAuthority> getAuthorities() {
     return userAuthorities;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/a98a8a25/ambari-server/src/main/resources/webapp/WEB-INF/spring-security.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/webapp/WEB-INF/spring-security.xml b/ambari-server/src/main/resources/webapp/WEB-INF/spring-security.xml
deleted file mode 100644
index bdbf0de..0000000
--- a/ambari-server/src/main/resources/webapp/WEB-INF/spring-security.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
--->
-<beans:beans xmlns="http://www.springframework.org/schema/security"
-             xmlns:beans="http://www.springframework.org/schema/beans"
-             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-             xsi:schemaLocation="http://www.springframework.org/schema/beans
-                    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
-                    http://www.springframework.org/schema/security
-                    http://www.springframework.org/schema/security/spring-security-3.1.xsd">
-
-  <http use-expressions="true"
-        disable-url-rewriting="true" entry-point-ref="ambariEntryPoint">
-    <intercept-url pattern="/**" access="isAuthenticated()"/>
-    <custom-filter ref="ambariUserAuthorizationFilter" before="BASIC_AUTH_FILTER"/>
-    <custom-filter ref="ambariDelegatingAuthenticationFilter" position="BASIC_AUTH_FILTER"/>
-    <custom-filter ref="ambariAuthorizationFilter" before="FILTER_SECURITY_INTERCEPTOR"/>
-  </http>
-
-  <authentication-manager alias="authenticationManager">
-    <authentication-provider ref="ambariLocalAuthenticationProvider"/>
-    <authentication-provider ref="ambariPamAuthenticationProvider"/>
-    <authentication-provider ref="ambariLdapAuthenticationProvider"/>
-    <authentication-provider ref="ambariInternalAuthenticationProvider"/>
-    <authentication-provider ref="kerberosServiceAuthenticationProvider"/>
-  </authentication-manager>
-
-  <beans:bean id="ambariEntryPoint" class="org.apache.ambari.server.security.AmbariEntryPoint">
-    <beans:constructor-arg ref="ambariConfiguration"/>
-  </beans:bean>
-
-  <beans:bean id="ambariDelegatingAuthenticationFilter" class="org.apache.ambari.server.security.authentication.AmbariDelegatingAuthenticationFilter">
-    <beans:constructor-arg>
-      <beans:list>
-        <beans:ref bean="ambariBasicAuthenticationFilter"/>
-        <beans:ref bean="ambariKerberosAuthenticationFilter"/>
-        <beans:ref bean="ambariJwtAuthenticationFilter"/>
-      </beans:list>
-    </beans:constructor-arg>
-  </beans:bean>
-
-  <beans:bean id="ambariBasicAuthenticationFilter" class="org.apache.ambari.server.security.authentication.AmbariBasicAuthenticationFilter">
-    <beans:constructor-arg ref="authenticationManager"/>
-    <beans:constructor-arg ref="ambariEntryPoint"/>
-    <beans:constructor-arg ref="auditLogger"/>
-    <beans:constructor-arg ref="permissionHelper"/>
-  </beans:bean>
-
-  <beans:bean id="ambariJwtAuthenticationFilter" class="org.apache.ambari.server.security.authentication.AmbariJWTAuthenticationFilter">
-    <beans:constructor-arg ref="ambariEntryPoint"/>
-    <beans:constructor-arg ref="ambariConfiguration"/>
-    <beans:constructor-arg ref="ambariUsers"/>
-    <beans:constructor-arg ref="auditLogger"/>
-    <beans:constructor-arg ref="permissionHelper"/>
-  </beans:bean>
-
-  <beans:bean id="ambariKerberosAuthenticationFilter" class="org.apache.ambari.server.security.authentication.kerberos.AmbariKerberosAuthenticationFilter">
-    <beans:constructor-arg ref="authenticationManager"/>
-    <beans:constructor-arg ref="ambariEntryPoint"/>
-    <beans:constructor-arg ref="ambariConfiguration"/>
-    <beans:constructor-arg ref="auditLogger"/>
-    <beans:constructor-arg ref="permissionHelper"/>
-  </beans:bean>
-
-  <beans:bean id="ambariAuthorizationFilter" class="org.apache.ambari.server.security.authorization.AmbariAuthorizationFilter">
-    <beans:constructor-arg ref="ambariEntryPoint"/>
-    <beans:constructor-arg ref="ambariConfiguration"/>
-    <beans:constructor-arg ref="ambariUsers"/>
-    <beans:constructor-arg ref="auditLogger"/>
-    <beans:constructor-arg ref="permissionHelper"/>
-  </beans:bean>
-
-  <beans:bean id="kerberosServiceAuthenticationProvider" class="org.springframework.security.kerberos.authentication.KerberosServiceAuthenticationProvider">
-    <beans:property name="ticketValidator">
-      <beans:bean class="org.apache.ambari.server.security.authentication.kerberos.AmbariKerberosTicketValidator">
-        <beans:constructor-arg ref="ambariConfiguration"/>
-        <beans:property name="debug" value="false"/>
-      </beans:bean>
-    </beans:property>
-
-    <beans:property name="userDetailsService" ref="authToLocalUserDetailsService"/>
-  </beans:bean>
-
-  <beans:bean id="authToLocalUserDetailsService" class="org.apache.ambari.server.security.authentication.kerberos.AmbariAuthToLocalUserDetailsService">
-    <beans:constructor-arg ref="ambariConfiguration"/>
-    <beans:constructor-arg ref="ambariUsers"/>
-  </beans:bean>
-
-</beans:beans>

http://git-wip-us.apache.org/repos/asf/ambari/blob/a98a8a25/ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java
index 5feb3cc..3b485b0 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java
@@ -79,7 +79,7 @@ import org.apache.commons.logging.LogFactory;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
 import org.easymock.EasyMock;
-import org.eclipse.jetty.server.SessionManager;
+import org.eclipse.jetty.server.session.SessionHandler;
 import org.junit.Test;
 
 import com.google.gson.Gson;
@@ -106,7 +106,7 @@ public class AgentResourceTest extends RandomPortJerseyTest {
   protected Client client;
   HeartBeatHandler handler;
   ActionManager actionManager;
-  SessionManager sessionManager;
+  SessionHandler sessionHandler;
   Injector injector;
   AmbariMetaInfo ambariMetaInfo;
   OsFamily os_family;
@@ -308,11 +308,11 @@ public class AgentResourceTest extends RandomPortJerseyTest {
       actionManager = mock(ActionManager.class);
       ambariMetaInfo = mock(AmbariMetaInfo.class);
       actionDBAccessor = mock(ActionDBAccessor.class);
-      sessionManager = mock(SessionManager.class);
+      sessionHandler = mock(SessionHandler.class);
       bind(OsFamily.class).toInstance(os_family);
       bind(ActionDBAccessor.class).toInstance(actionDBAccessor);
       bind(ActionManager.class).toInstance(actionManager);
-      bind(SessionManager.class).toInstance(sessionManager);
+      bind(SessionHandler.class).toInstance(sessionHandler);
       bind(AgentCommand.class).to(ExecutionCommand.class);
       bind(HeartBeatHandler.class).toInstance(handler);
       bind(AmbariMetaInfo.class).toInstance(ambariMetaInfo);

http://git-wip-us.apache.org/repos/asf/ambari/blob/a98a8a25/ambari-server/src/test/java/org/apache/ambari/server/api/AmbariErrorHandlerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/AmbariErrorHandlerTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/api/AmbariErrorHandlerTest.java
index 239bfcb..1f5c5cd 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/AmbariErrorHandlerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/AmbariErrorHandlerTest.java
@@ -32,6 +32,7 @@ import javax.servlet.http.HttpServletResponse;
 
 import org.apache.ambari.server.configuration.Configuration;
 import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
 import org.eclipse.jetty.servlet.DefaultServlet;
 import org.eclipse.jetty.servlet.ServletContextHandler;
 import org.junit.Test;
@@ -65,7 +66,7 @@ public class AmbariErrorHandlerTest {
 
     server.start();
 
-    int localPort = server.getConnectors()[0].getLocalPort();
+    int localPort = ((ServerConnector)server.getConnectors()[0]).getLocalPort();
 
     Client client = new Client();
     WebResource resource = client.resource("http://localhost:" + localPort + "/");

http://git-wip-us.apache.org/repos/asf/ambari/blob/a98a8a25/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java
index f64a97f..d9d524f 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java
@@ -59,7 +59,7 @@ import org.easymock.EasyMock;
 import org.easymock.EasyMockSupport;
 import org.eclipse.jetty.http.MimeTypes;
 import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.SessionManager;
+import org.eclipse.jetty.server.session.SessionHandler;
 import org.eclipse.jetty.servlet.FilterHolder;
 import org.eclipse.jetty.servlet.ServletContextHandler;
 import org.eclipse.jetty.servlets.GzipFilter;
@@ -101,12 +101,12 @@ public class AmbariServerTest {
     AmbariServer ambariServer = new AmbariServer();
 
     Configuration configuration = createNiceMock(Configuration.class);
-    SessionManager sessionManager = createNiceMock(SessionManager.class);
+    SessionHandler sessionHandler = createNiceMock(SessionHandler.class);
     SessionCookieConfig sessionCookieConfig = createNiceMock(SessionCookieConfig.class);
 
     ambariServer.configs = configuration;
 
-    expect(sessionManager.getSessionCookieConfig()).andReturn(sessionCookieConfig).anyTimes();
+    expect(sessionHandler.getSessionCookieConfig()).andReturn(sessionCookieConfig).anyTimes();
 
     expect(configuration.getApiSSLAuthentication()).andReturn(false);
     sessionCookieConfig.setHttpOnly(true);
@@ -115,15 +115,15 @@ public class AmbariServerTest {
     sessionCookieConfig.setHttpOnly(true);
     sessionCookieConfig.setSecure(true);
 
-    replay(configuration, sessionManager, sessionCookieConfig);
+    replay(configuration, sessionHandler, sessionCookieConfig);
 
     // getApiSSLAuthentication == false
-    ambariServer.configureSessionManager(sessionManager);
+    ambariServer.configureSessionHandler(sessionHandler);
 
     // getApiSSLAuthentication == true
-    ambariServer.configureSessionManager(sessionManager);
+    ambariServer.configureSessionHandler(sessionHandler);
 
-    verify(configuration, sessionManager, sessionCookieConfig);
+    verify(configuration, sessionHandler, sessionCookieConfig);
   }
 
   @Test
@@ -216,15 +216,15 @@ public class AmbariServerTest {
     AmbariServer ambariServer = new AmbariServer();
 
     // 12 acceptors (48 core machine) with a configured pool size of 25
-    ambariServer.configureJettyThreadPool(server, 12, "mock-pool", 25);
+    server = ambariServer.configureJettyThreadPool(12, "mock-pool", 25);
     Assert.assertEquals(44, ((QueuedThreadPool) server.getThreadPool()).getMaxThreads());
 
     // 2 acceptors (8 core machine) with a configured pool size of 25
-    ambariServer.configureJettyThreadPool(server, 2, "mock-pool", 25);
+    server = ambariServer.configureJettyThreadPool(2, "mock-pool", 25);
     Assert.assertEquals(25, ((QueuedThreadPool) server.getThreadPool()).getMaxThreads());
 
     // 16 acceptors (64 core machine) with a configured pool size of 35
-    ambariServer.configureJettyThreadPool(server, 16, "mock-pool", 35);
+    server = ambariServer.configureJettyThreadPool(16, "mock-pool", 35);
     Assert.assertEquals(52, ((QueuedThreadPool) server.getThreadPool()).getMaxThreads());
 
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/a98a8a25/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariSessionManagerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariSessionManagerTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariSessionManagerTest.java
index 23f07c7..0782a85 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariSessionManagerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariSessionManagerTest.java
@@ -29,7 +29,7 @@ import static org.junit.Assert.assertNull;
 import javax.servlet.SessionCookieConfig;
 import javax.servlet.http.HttpSession;
 
-import org.eclipse.jetty.server.SessionManager;
+import org.eclipse.jetty.server.session.SessionHandler;
 import org.junit.Test;
 
 public class AmbariSessionManagerTest {
@@ -55,21 +55,21 @@ public class AmbariSessionManagerTest {
 
   @Test
   public void testGetSessionCookie() throws Exception {
-    SessionManager sessionManager = createNiceMock(SessionManager.class);
+    SessionHandler sessionHandler = createNiceMock(SessionHandler.class);
     SessionCookieConfig sessionCookieConfig = createNiceMock(SessionCookieConfig.class);
 
     AmbariSessionManager ambariSessionManager = new AmbariSessionManager();
 
-    ambariSessionManager.sessionManager = sessionManager;
+    ambariSessionManager.sessionHandler = sessionHandler;
 
     expect(sessionCookieConfig.getName()).andReturn("SESSION_COOKIE").anyTimes();
-    expect(sessionManager.getSessionCookieConfig()).andReturn(sessionCookieConfig).anyTimes();
+    expect(sessionHandler.getSessionCookieConfig()).andReturn(sessionCookieConfig).anyTimes();
 
-    replay(sessionManager, sessionCookieConfig);
+    replay(sessionHandler, sessionCookieConfig);
 
     assertEquals("SESSION_COOKIE", ambariSessionManager.getSessionCookie());
 
-    verify(sessionManager, sessionCookieConfig);
+    verify(sessionHandler, sessionCookieConfig);
   }
 
   @Test
@@ -119,4 +119,4 @@ public class AmbariSessionManagerTest {
 
     verify(session, sessionManager);
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/a98a8a25/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java
index 1c45589..f359fc1 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java
@@ -65,7 +65,7 @@ import org.apache.ambari.server.state.stack.upgrade.Grouping;
 import org.easymock.Capture;
 import org.easymock.EasyMock;
 import org.easymock.EasyMockSupport;
-import org.eclipse.jetty.server.SessionManager;
+import org.eclipse.jetty.server.session.SessionHandler;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -279,7 +279,7 @@ public class StackUpgradeConfigurationMergeTest extends EasyMockSupport
{
       binder.bind(AmbariManagementController.class).toInstance(createNiceMock(AmbariManagementController.class));
       binder.bind(ClusterController.class).toInstance(createNiceMock(ClusterController.class));
       binder.bind(StackManagerFactory.class).toInstance(createNiceMock(StackManagerFactory.class));
-      binder.bind(SessionManager.class).toInstance(createNiceMock(SessionManager.class));
+      binder.bind(SessionHandler.class).toInstance(createNiceMock(SessionHandler.class));
       binder.bind(RequestExecutionFactory.class).toInstance(createNiceMock(RequestExecutionFactory.class));
       binder.bind(ExecutionScheduler.class).toInstance(createNiceMock(ExecutionScheduler.class));
       binder.bind(RequestFactory.class).toInstance(createNiceMock(RequestFactory.class));

http://git-wip-us.apache.org/repos/asf/ambari/blob/a98a8a25/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterEffectiveVersionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterEffectiveVersionTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterEffectiveVersionTest.java
index d3c8acf..35c5fbf 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterEffectiveVersionTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterEffectiveVersionTest.java
@@ -68,7 +68,7 @@ import org.apache.ambari.server.state.stack.upgrade.Direction;
 import org.apache.ambari.server.state.stack.upgrade.UpgradeType;
 import org.easymock.EasyMock;
 import org.easymock.EasyMockSupport;
-import org.eclipse.jetty.server.SessionManager;
+import org.eclipse.jetty.server.session.SessionHandler;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -261,7 +261,7 @@ public class ClusterEffectiveVersionTest extends EasyMockSupport {
       binder.bind(AmbariManagementController.class).toInstance(EasyMock.createNiceMock(AmbariManagementController.class));
       binder.bind(ClusterController.class).toInstance(EasyMock.createNiceMock(ClusterController.class));
       binder.bind(StackManagerFactory.class).toInstance(EasyMock.createNiceMock(StackManagerFactory.class));
-      binder.bind(SessionManager.class).toInstance(EasyMock.createNiceMock(SessionManager.class));
+      binder.bind(SessionHandler.class).toInstance(EasyMock.createNiceMock(SessionHandler.class));
       binder.bind(RequestExecutionFactory.class).toInstance(EasyMock.createNiceMock(RequestExecutionFactory.class));
       binder.bind(ExecutionScheduler.class).toInstance(EasyMock.createNiceMock(ExecutionScheduler.class));
       binder.bind(RequestFactory.class).toInstance(EasyMock.createNiceMock(RequestFactory.class));

http://git-wip-us.apache.org/repos/asf/ambari/blob/a98a8a25/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java
index fd3f4e4..48e6120 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java
@@ -164,9 +164,9 @@ public class DataStoreImplTest {
     dataStore.store(new TestEntity("foo", new TestSubEntity("bar")));
 
     Assert.assertEquals("bar", entityCapture.getValue().get("DS_name"));
-    Assert.assertEquals(99, entityCapture.getValue().get("DS_id"));
+    Assert.assertEquals(new Integer(99), entityCapture.getValue().get("DS_id"));
 
-    Assert.assertEquals(100, entityCapture2.getValue().get("DS_id"));
+    Assert.assertEquals(new Integer(100), entityCapture2.getValue().get("DS_id"));
     Assert.assertEquals("foo", entityCapture2.getValue().get("DS_name"));
 
     // verify mocks


Mime
View raw message