YARN-2388. Fixed TestTimelineWebServices failure due to HADOOP-10791. Contributed by Zhijie Shen.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1616405 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhijie Shen 2014-08-07 05:36:50 +00:00
parent 8feddc4c84
commit be6360593b
2 changed files with 5 additions and 0 deletions

View File

@ -140,6 +140,8 @@ Release 2.6.0 - UNRELEASED
YARN-2359. Application hangs when it fails to launch AM container.
(Zhihai Xu via kasha)
YARN-2388. Fixed TestTimelineWebServices failure due to HADOOP-10791. (zjshen)
Release 2.5.0 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -33,6 +33,7 @@
import java.util.Set;
import javax.servlet.FilterConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.ws.rs.core.MediaType;
@ -105,6 +106,8 @@ protected void configureServlets() {
.thenReturn("simple");
when(filterConfig.getInitParameter(
PseudoAuthenticationHandler.ANONYMOUS_ALLOWED)).thenReturn("true");
ServletContext context = mock(ServletContext.class);
when(filterConfig.getServletContext()).thenReturn(context);
Enumeration<Object> names = mock(Enumeration.class);
when(names.hasMoreElements()).thenReturn(true, true, false);
when(names.nextElement()).thenReturn(