aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Boudnik <cos@apache.org>2016-01-15 14:51:53 -0800
committerKonstantin Boudnik <cos@apache.org>2016-01-15 17:05:17 -0800
commit75bb6142752c26800aa7ab0bbfc1ca66fad8424d (patch)
treeabedb07a703889e372f1b996df5c1dac55482e24
parentfc6aaaef7fd94b17db36f6b49db6a6b5c31e1193 (diff)
BIGTOP-2249. Add YARN smoke tests
-rw-r--r--bigtop-tests/smoke-tests/yarn/build.gradle51
-rw-r--r--bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/yarn/TestNode.groovy14
-rw-r--r--bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/yarn/TestRmAdmin.groovy14
3 files changed, 51 insertions, 28 deletions
diff --git a/bigtop-tests/smoke-tests/yarn/build.gradle b/bigtop-tests/smoke-tests/yarn/build.gradle
new file mode 100644
index 00000000..dd0046b4
--- /dev/null
+++ b/bigtop-tests/smoke-tests/yarn/build.gradle
@@ -0,0 +1,51 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ */
+def junitVersion = '4.11'
+dependencies {
+ compile group: 'junit', name: 'junit', version: junitVersion, transitive: 'true'
+ compile group: 'org.apache.hadoop', name: 'hadoop-common',
+ version: hadoopVersion, classifier: 'tests', transitive: 'true'
+ compile group: 'org.apache.hadoop', name: 'hadoop-hdfs',
+ version: hadoopVersion, classifier: 'tests', transitive: 'true'
+ compile group: 'org.apache.hadoop', name: 'hadoop-common', version: hadoopVersion, transitive: 'true'
+ compile group: 'org.apache.hadoop', name: 'hadoop-hdfs', version: hadoopVersion, transitive: 'true'
+ if (System.env.HADOOP_CONF_DIR) testRuntime files(System.env.HADOOP_CONF_DIR)
+}
+
+sourceSets {
+ test {
+ groovy {
+ resources {
+ srcDirs = [
+ "${BIGTOP_HOME}/bigtop-tests/test-artifacts/hadoop/src/main/resources",
+ ]
+ }
+ srcDirs = [
+ "${BIGTOP_HOME}/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/yarn"
+ ]
+ }
+ }
+}
+
+test.doFirst {
+ checkEnv(["HADOOP_CONF_DIR"])
+}
+
+test {
+ include '**/Test*'
+}
diff --git a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/yarn/TestNode.groovy b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/yarn/TestNode.groovy
index 1dd2c1a5..69cd7a22 100644
--- a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/yarn/TestNode.groovy
+++ b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/yarn/TestNode.groovy
@@ -20,10 +20,7 @@ package org.apache.bigtop.itest.hadoop.yarn;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
import org.junit.Test;
-import org.apache.bigtop.itest.JarContent;
import org.apache.bigtop.itest.shell.Shell;
public class TestNode {
@@ -31,17 +28,6 @@ public class TestNode {
// set debugging variable to true if you want error messages sent to stdout
private static Shell sh = new Shell("/bin/bash");
- @BeforeClass
- public static void setUp() {
- // unpack resource
- JarContent.unpackJarContainer(TestNode.class, ".", null);
- System.out.println("Running Node commands:");
- }
-
- @AfterClass
- public static void tearDown() {
- }
-
@Test (timeout = 0x15000l)
public void testNodeBasic() {
// list
diff --git a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/yarn/TestRmAdmin.groovy b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/yarn/TestRmAdmin.groovy
index 5e98a5aa..908aec81 100644
--- a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/yarn/TestRmAdmin.groovy
+++ b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/yarn/TestRmAdmin.groovy
@@ -20,10 +20,7 @@ package org.apache.bigtop.itest.hadoop.yarn;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
import org.junit.Test;
-import org.apache.bigtop.itest.JarContent;
import org.apache.bigtop.itest.shell.Shell;
public class TestRmAdmin {
@@ -31,17 +28,6 @@ public class TestRmAdmin {
// set debugging variable to true if you want error messages sent to stdout
private static Shell sh = new Shell("/bin/bash");
- @BeforeClass
- public static void setUp() {
- // unpack resource
- JarContent.unpackJarContainer(TestRmAdmin.class, ".", null);
- System.out.println("Running RmAdmin commands:");
- }
-
- @AfterClass
- public static void tearDown() {
- }
-
@Test (timeout = 0x45000l)
public void testRmAdminBasic() {
// help