diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/factories/impl/pb/TestRpcClientFactoryPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/factories/impl/pb/TestRpcClientFactoryPBImpl.java index 56a64a7340d..c5f875a6faa 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/factories/impl/pb/TestRpcClientFactoryPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/factories/impl/pb/TestRpcClientFactoryPBImpl.java @@ -6,9 +6,9 @@ * 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 - * + *

+ * 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. @@ -24,23 +24,25 @@ import java.net.InetSocketAddress; import static org.mockito.Matchers.anyString; -import static org.mockito.Mockito.*; +import static org.mockito.Mockito.atLeastOnce; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; /** * */ public class TestRpcClientFactoryPBImpl { - @Test - public void testToUseCustomClassloader() throws Exception { - Configuration configuration = mock(Configuration.class); - RpcClientFactoryPBImpl rpcClientFactoryPB = RpcClientFactoryPBImpl.get(); - try { - rpcClientFactoryPB.getClient(Class.forName("org.apache.hadoop.yarn.api.ApplicationClientProtocol"), -1, - new InetSocketAddress(0), configuration); - } catch (Exception e) { - // Do nothing - } - verify(configuration, atLeastOnce()).getClassByName(anyString()); + @Test + public void testToUseCustomClassloader() throws Exception { + Configuration configuration = mock(Configuration.class); + RpcClientFactoryPBImpl rpcClientFactoryPB = RpcClientFactoryPBImpl.get(); + try { + rpcClientFactoryPB.getClient(Class.forName("org.apache.hadoop.yarn.api.ApplicationClientProtocol"), -1, + new InetSocketAddress(0), configuration); + } catch (Exception e) { + // Do nothing } + verify(configuration, atLeastOnce()).getClassByName(anyString()); + } } \ No newline at end of file diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/factories/impl/pb/TestRpcServerFactoryPBImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/factories/impl/pb/TestRpcServerFactoryPBImpl.java index 7b3856488e2..2e56606ba69 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/factories/impl/pb/TestRpcServerFactoryPBImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/factories/impl/pb/TestRpcServerFactoryPBImpl.java @@ -6,9 +6,9 @@ * 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 - * + *

+ * 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. @@ -29,17 +29,17 @@ import static org.mockito.Mockito.verify; public class TestRpcServerFactoryPBImpl { - @Test - public void testToUseCustomClassloader() throws Exception { - Configuration configuration = mock(Configuration.class); - RpcServerFactoryPBImpl rpcServerFactoryPB = RpcServerFactoryPBImpl.get(); - try { + @Test + public void testToUseCustomClassloader() throws Exception { + Configuration configuration = mock(Configuration.class); + RpcServerFactoryPBImpl rpcServerFactoryPB = RpcServerFactoryPBImpl.get(); + try { - rpcServerFactoryPB.getServer(Class.forName("org.apache.hadoop.yarn.api.ApplicationClientProtocol"), -1, - new InetSocketAddress(0), configuration, null, 1); - } catch (Exception e) { - // Do nothing - } - verify(configuration, atLeastOnce()).getClassByName(anyString()); + rpcServerFactoryPB.getServer(Class.forName("org.apache.hadoop.yarn.api.ApplicationClientProtocol"), -1, + new InetSocketAddress(0), configuration, null, 1); + } catch (Exception e) { + // Do nothing } + verify(configuration, atLeastOnce()).getClassByName(anyString()); + } } \ No newline at end of file