[09/74] [abbrv] hadoop git commit: YARN-7050. Post cleanup after YARN-6903, removal of org.apache.slider package. Contributed by Jian He
http://git-wip-us.apache.org/repos/asf/hadoop/blob/2b3aff2f/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/test/java/org/apache/slider/client/TestClientBadArgs.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/test/java/org/apache/slider/client/TestClientBadArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/test/java/org/apache/slider/client/TestClientBadArgs.java deleted file mode 100644 index 7b0586e..000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/test/java/org/apache/slider/client/TestClientBadArgs.java +++ /dev/null @@ -1,229 +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. - */ - -package org.apache.slider.client; - -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.yarn.conf.YarnConfiguration; -import org.apache.hadoop.yarn.service.client.params.Arguments; -import org.apache.hadoop.yarn.service.client.params.SliderActions; -import org.apache.slider.core.exceptions.BadCommandArgumentsException; -import org.apache.slider.core.exceptions.ErrorStrings; -import org.apache.slider.core.exceptions.UsageException; -import org.apache.slider.utils.SliderTestBase; -import org.junit.Ignore; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Arrays; - -/** - * Test the argument parsing/validation logic. - */ -public class TestClientBadArgs extends SliderTestBase { - private static final Logger LOG = - LoggerFactory.getLogger(TestClientBadArgs.class); - - //@Test - public void testNoAction() throws Throwable { -launchExpectingException(SliderClient.class, - createTestConfig(), - "Usage: slider COMMAND", - EMPTY_LIST); - - } - - //@Test - public void testUnknownAction() throws Throwable { -launchExpectingException(SliderClient.class, - createTestConfig(), - "not-a-known-action", - Arrays.asList("not-a-known-action")); - } - - //@Test - public void testActionWithoutOptions() throws Throwable { -launchExpectingException(SliderClient.class, - createTestConfig(), - "Usage: slider build ", - Arrays.asList(SliderActions.ACTION_BUILD)); - } - - //@Test - public void testActionWithoutEnoughArgs() throws Throwable { -launchExpectingException(SliderClient.class, - createTestConfig(), - ErrorStrings.ERROR_NOT_ENOUGH_ARGUMENTS, - Arrays.asList(SliderActions.ACTION_START)); - } - - //@Test - public void testActionWithTooManyArgs() throws Throwable { -launchExpectingException(SliderClient.class, - createTestConfig(), - ErrorStrings.ERROR_TOO_MANY_ARGUMENTS, - Arrays.asList(SliderActions.ACTION_HELP, - "hello, world")); - } - - //@Test - public void testBadImageArg() throws Throwable { -launchExpectingException(SliderClient.class, - createTestConfig(), - "Unknown option: --image", -Arrays.asList(SliderActions.ACTION_HELP, - Arguments.ARG_IMAGE)); - } - - //@Test - public void testRegistryUsage() throws Throwable { -Throwable exception = launchExpectingException(SliderClient.class, -createTestConfig(), -"org.apache.slider.core.exceptions.UsageException: Argument --name " + -"missing", -Arrays.asList(SliderActions.ACTION_REGISTRY)); -assertTrue(exception instanceof UsageException); -LOG.info(exception.toString()); - } - - //@Test - public void testRegistryExportBadUsage1() throws Throwable { -Throwabl
[09/74] [abbrv] hadoop git commit: YARN-7050. Post cleanup after YARN-6903, removal of org.apache.slider package. Contributed by Jian He
http://git-wip-us.apache.org/repos/asf/hadoop/blob/43277ffd/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/test/java/org/apache/slider/client/TestClientBadArgs.java -- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/test/java/org/apache/slider/client/TestClientBadArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/test/java/org/apache/slider/client/TestClientBadArgs.java deleted file mode 100644 index 7b0586e..000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/test/java/org/apache/slider/client/TestClientBadArgs.java +++ /dev/null @@ -1,229 +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. - */ - -package org.apache.slider.client; - -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.yarn.conf.YarnConfiguration; -import org.apache.hadoop.yarn.service.client.params.Arguments; -import org.apache.hadoop.yarn.service.client.params.SliderActions; -import org.apache.slider.core.exceptions.BadCommandArgumentsException; -import org.apache.slider.core.exceptions.ErrorStrings; -import org.apache.slider.core.exceptions.UsageException; -import org.apache.slider.utils.SliderTestBase; -import org.junit.Ignore; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Arrays; - -/** - * Test the argument parsing/validation logic. - */ -public class TestClientBadArgs extends SliderTestBase { - private static final Logger LOG = - LoggerFactory.getLogger(TestClientBadArgs.class); - - //@Test - public void testNoAction() throws Throwable { -launchExpectingException(SliderClient.class, - createTestConfig(), - "Usage: slider COMMAND", - EMPTY_LIST); - - } - - //@Test - public void testUnknownAction() throws Throwable { -launchExpectingException(SliderClient.class, - createTestConfig(), - "not-a-known-action", - Arrays.asList("not-a-known-action")); - } - - //@Test - public void testActionWithoutOptions() throws Throwable { -launchExpectingException(SliderClient.class, - createTestConfig(), - "Usage: slider build ", - Arrays.asList(SliderActions.ACTION_BUILD)); - } - - //@Test - public void testActionWithoutEnoughArgs() throws Throwable { -launchExpectingException(SliderClient.class, - createTestConfig(), - ErrorStrings.ERROR_NOT_ENOUGH_ARGUMENTS, - Arrays.asList(SliderActions.ACTION_START)); - } - - //@Test - public void testActionWithTooManyArgs() throws Throwable { -launchExpectingException(SliderClient.class, - createTestConfig(), - ErrorStrings.ERROR_TOO_MANY_ARGUMENTS, - Arrays.asList(SliderActions.ACTION_HELP, - "hello, world")); - } - - //@Test - public void testBadImageArg() throws Throwable { -launchExpectingException(SliderClient.class, - createTestConfig(), - "Unknown option: --image", -Arrays.asList(SliderActions.ACTION_HELP, - Arguments.ARG_IMAGE)); - } - - //@Test - public void testRegistryUsage() throws Throwable { -Throwable exception = launchExpectingException(SliderClient.class, -createTestConfig(), -"org.apache.slider.core.exceptions.UsageException: Argument --name " + -"missing", -Arrays.asList(SliderActions.ACTION_REGISTRY)); -assertTrue(exception instanceof UsageException); -LOG.info(exception.toString()); - } - - //@Test - public void testRegistryExportBadUsage1() throws Throwable { -Throwabl