You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ae...@apache.org on 2017/04/12 23:42:26 UTC
[39/50] hadoop git commit: YARN-6450. TestContainerManagerWithLCE
requires override for each new test added to ContainerManagerTest?
Contributed by Jason Lowe.
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/HDFS-7240
Commit: a16ab2be91e29f0aa4ad3488d35977cb5d1e1f5c
Parents: f48e968
Author: Eric Payne <ep...@apache.org>
Authored: Wed Apr 12 10:20:08 2017 -0500
Committer: Eric Payne <ep...@apache.org>
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