Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 88970200C59 for ; Mon, 17 Apr 2017 17:15:37 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 875F1160BAB; Mon, 17 Apr 2017 15:15:37 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8985D160B9C for ; Mon, 17 Apr 2017 17:15:36 +0200 (CEST) Received: (qmail 18734 invoked by uid 500); 17 Apr 2017 15:15:27 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 17444 invoked by uid 99); 17 Apr 2017 15:15:27 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Apr 2017 15:15:27 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E8656E178A; Mon, 17 Apr 2017 15:15:26 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: asuresh@apache.org To: common-commits@hadoop.apache.org Date: Mon, 17 Apr 2017 15:16:01 -0000 Message-Id: <2f1af2be68454f9fb9a6e0524107bd72@git.apache.org> In-Reply-To: <688528025789441996988543d43ba921@git.apache.org> References: <688528025789441996988543d43ba921@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [36/50] hadoop git commit: YARN-6450. TestContainerManagerWithLCE requires override for each new test added to ContainerManagerTest? Contributed by Jason Lowe. archived-at: Mon, 17 Apr 2017 15:15:37 -0000 YARN-6450. TestContainerManagerWithLCE requires override for each new test added to ContainerManagerTest? Contributed by Jason Lowe. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/a16ab2be Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/a16ab2be Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/a16ab2be Branch: refs/heads/trunk Commit: a16ab2be91e29f0aa4ad3488d35977cb5d1e1f5c Parents: f48e968 Author: Eric Payne Authored: Wed Apr 12 10:20:08 2017 -0500 Committer: Eric Payne Committed: Wed Apr 12 10:20:08 2017 -0500 ---------------------------------------------------------------------- .../TestContainerManagerWithLCE.java | 310 +------------------ 1 file changed, 3 insertions(+), 307 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/a16ab2be/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestContainerManagerWithLCE.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestContainerManagerWithLCE.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestContainerManagerWithLCE.java index 5dc4717..028db6a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestContainerManagerWithLCE.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestContainerManagerWithLCE.java @@ -30,6 +30,7 @@ import org.apache.hadoop.yarn.conf.YarnConfiguration; import org.apache.hadoop.yarn.exceptions.YarnException; import org.apache.hadoop.yarn.server.nodemanager.containermanager.TestContainerManager; import org.junit.After; +import org.junit.Assume; public class TestContainerManagerWithLCE extends TestContainerManager { @@ -51,11 +52,8 @@ public class TestContainerManagerWithLCE extends TestContainerManager { @Override public void setup() throws IOException { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } + Assume.assumeTrue("LCE binary path is not passed. Not running the test", + shouldRunTest()); super.setup(); localFS.setPermission(new Path(localDir.getCanonicalPath()), new FsPermission( @@ -73,308 +71,6 @@ public class TestContainerManagerWithLCE extends TestContainerManager { } } - @Override - public void testContainerSetup() throws Exception, InterruptedException, - YarnException { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testContainerSetup"); - super.testContainerSetup(); - } - - @Override - public void testContainerManagerInitialization() throws IOException { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testContainerManagerInitialization"); - super.testContainerManagerInitialization(); - } - - @Override - public void testContainerLaunchAndStop() throws IOException, - InterruptedException, YarnException { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testContainerLaunchAndStop"); - super.testContainerLaunchAndStop(); - } - - @Override - public void testContainerLaunchAndExitSuccess() throws IOException, - InterruptedException, YarnException { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testContainerLaunchAndExitSuccess"); - super.testContainerLaunchAndExitSuccess(); - } - - @Override - public void testContainerLaunchAndExitFailure() throws IOException, - InterruptedException, YarnException { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testContainerLaunchAndExitFailure"); - super.testContainerLaunchAndExitFailure(); - } - - @Override - public void testLocalingResourceWhileContainerRunning() - throws Exception { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - super.testLocalingResourceWhileContainerRunning(); - } - - @Override - public void testLocalFilesCleanup() throws InterruptedException, - IOException, YarnException { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testLocalFilesCleanup"); - super.testLocalFilesCleanup(); - } - - @Override - public void testContainerLaunchFromPreviousRM() throws InterruptedException, - IOException, YarnException { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testContainerLaunchFromPreviousRM"); - super.testContainerLaunchFromPreviousRM(); - } - - @Override - public void testMultipleContainersLaunch() throws Exception { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testContainerLaunchFromPreviousRM"); - super.testMultipleContainersLaunch(); - } - - @Override - public void testMultipleContainersStopAndGetStatus() throws Exception { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testContainerLaunchFromPreviousRM"); - super.testMultipleContainersStopAndGetStatus(); - } - - @Override - public void testUnauthorizedRequests() throws IOException, YarnException { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testUnauthorizedRequests"); - super.testUnauthorizedRequests(); - } - - @Override - public void testStartContainerFailureWithUnknownAuxService() throws Exception { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testContainerLaunchFromPreviousRM"); - super.testStartContainerFailureWithUnknownAuxService(); - } - - @Override - public void testIncreaseContainerResourceWithInvalidRequests() throws Exception { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testIncreaseContainerResourceWithInvalidRequests"); - super.testIncreaseContainerResourceWithInvalidRequests(); - } - - @Override - public void testIncreaseContainerResourceWithInvalidResource() throws Exception { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testIncreaseContainerResourceWithInvalidResource"); - super.testIncreaseContainerResourceWithInvalidResource(); - } - - @Override - public void testChangeContainerResource() throws Exception { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testChangeContainerResource"); - super.testChangeContainerResource(); - } - - @Override - public void testOutputThreadDumpSignal() throws IOException, - InterruptedException, YarnException { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testOutputThreadDumpSignal"); - super.testOutputThreadDumpSignal(); - } - - @Override - public void testGracefulShutdownSignal() throws IOException, - InterruptedException, YarnException { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testGracefulShutdownSignal"); - super.testGracefulShutdownSignal(); - } - - @Override - public void testForcefulShutdownSignal() throws IOException, - InterruptedException, YarnException { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testForcefulShutdownSignal"); - super.testForcefulShutdownSignal(); - } - - @Override - public void testContainerUpgradeSuccessAutoCommit() throws IOException, - InterruptedException, YarnException { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testContainerUpgradeSuccessAutoCommit"); - super.testContainerUpgradeSuccessAutoCommit(); - } - - @Override - public void testContainerUpgradeLocalizationFailure() throws IOException, - InterruptedException, YarnException { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testContainerUpgradeLocalizationFailure"); - super.testContainerUpgradeLocalizationFailure(); - } - - @Override - public void testContainerUpgradeSuccessExplicitCommit() throws IOException, - InterruptedException, YarnException { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testContainerUpgradeSuccessExplicitCommit"); - super.testContainerUpgradeSuccessExplicitCommit(); - } - - @Override - public void testContainerUpgradeSuccessExplicitRollback() throws IOException, - InterruptedException, YarnException { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testContainerUpgradeSuccessExplicitRollback"); - super.testContainerUpgradeSuccessExplicitRollback(); - } - - @Override - public void testContainerUpgradeRollbackDueToFailure() throws IOException, - InterruptedException, YarnException { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testContainerUpgradeRollbackDueToFailure"); - super.testContainerUpgradeRollbackDueToFailure(); - } - - @Override - public void testContainerUpgradeProcessFailure() throws IOException, - InterruptedException, YarnException { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testContainerUpgradeProcessFailure"); - super.testContainerUpgradeProcessFailure(); - } - - @Override - public void testContainerRestart() throws IOException, InterruptedException, - YarnException { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testContainerRestart"); - super.testContainerRestart(); - } - - @Override - public void testStartContainerFailureWithInvalidLocalResource() throws Exception { - // Don't run the test if the binary is not available. - if (!shouldRunTest()) { - LOG.info("LCE binary path is not passed. Not running the test"); - return; - } - LOG.info("Running testStartContainerFailureWithInvalidLocalResource"); - super.testStartContainerFailureWithInvalidLocalResource(); - } - private boolean shouldRunTest() { return System .getProperty(YarnConfiguration.NM_LINUX_CONTAINER_EXECUTOR_PATH) != null; --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-commits-help@hadoop.apache.org