You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by hi...@apache.org on 2015/02/18 20:11:13 UTC
tez git commit: TEZ-2058. Flaky test:
TestTezJobs::testInvalidQueueSubmission. (hitesh)
Repository: tez
Updated Branches:
refs/heads/master 0487e0ae5 -> 88d23256f
TEZ-2058. Flaky test: TestTezJobs::testInvalidQueueSubmission. (hitesh)
Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/88d23256
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/88d23256
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/88d23256
Branch: refs/heads/master
Commit: 88d23256ff7e5038ceb4b68877a41d2279b1cbeb
Parents: 0487e0a
Author: Hitesh Shah <hi...@apache.org>
Authored: Wed Feb 18 11:10:55 2015 -0800
Committer: Hitesh Shah <hi...@apache.org>
Committed: Wed Feb 18 11:10:55 2015 -0800
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../java/org/apache/tez/test/TestTezJobs.java | 43 +++++++++++++++++++-
2 files changed, 42 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tez/blob/88d23256/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 2c643b0..27509d1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -209,6 +209,7 @@ TEZ-UI CHANGES (TEZ-8):
Release 0.5.4: Unreleased
ALL CHANGES:
+ TEZ-2058. Flaky test: TestTezJobs::testInvalidQueueSubmission.
TEZ-2037. Should log TaskAttemptFinishedEvent if taskattempt is recovered to KILLED.
TEZ-2071. TestAMRecovery should set test names for test DAGs.
TEZ-1928. Tez local mode hang in Pig tez local mode.
http://git-wip-us.apache.org/repos/asf/tez/blob/88d23256/tez-tests/src/test/java/org/apache/tez/test/TestTezJobs.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/test/java/org/apache/tez/test/TestTezJobs.java b/tez-tests/src/test/java/org/apache/tez/test/TestTezJobs.java
index b9cb491..b2c9044 100644
--- a/tez-tests/src/test/java/org/apache/tez/test/TestTezJobs.java
+++ b/tez-tests/src/test/java/org/apache/tez/test/TestTezJobs.java
@@ -58,6 +58,7 @@ import org.apache.tez.dag.api.DataSourceDescriptor;
import org.apache.tez.dag.api.InputDescriptor;
import org.apache.tez.dag.api.InputInitializerDescriptor;
import org.apache.tez.dag.api.ProcessorDescriptor;
+import org.apache.tez.dag.api.SessionNotRunning;
import org.apache.tez.dag.api.TezConfiguration;
import org.apache.tez.dag.api.TezException;
import org.apache.tez.dag.api.Vertex;
@@ -694,10 +695,47 @@ public class TestTezJobs {
remoteFs.mkdirs(inputDir);
String outputDirStr = "/tmp/owc-output";
outputPaths[0] = outputDirStr;
+ int result = job.run(tezConf, new String[] { StringUtils.join(",", inputPaths),
+ StringUtils.join(",", outputPaths), "2" }, null);
+ Assert.assertTrue("Job should have failed", result != 0);
+ } catch (IOException e) {
+ Assert.assertTrue(e.getMessage().contains("Failed to submit application to YARN"));
+ } finally {
+ if (yarnClient != null) {
+ yarnClient.stop();
+ }
+ }
+ }
+
+ @Test(timeout = 60000)
+ public void testInvalidQueueSubmissionToSession() throws Exception {
+
+ TezConfiguration tezConf = new TezConfiguration(mrrTezCluster.getConfig());
+ YarnClient yarnClient = YarnClient.createYarnClient();
+ try {
+
+ yarnClient.init(mrrTezCluster.getConfig());
+ yarnClient.start();
+
+ SimpleSessionExample job = new SimpleSessionExample();
+ tezConf.setBoolean(TezConfiguration.TEZ_AM_SESSION_MODE, true);
+ tezConf.set(TezConfiguration.TEZ_QUEUE_NAME, "nonexistent");
+
+ String[] inputPaths = new String[1];
+ String[] outputPaths = new String[1];
+ String inputDirStr = "/tmp/owc-input";
+ inputPaths[0] = inputDirStr;
+ Path inputDir = new Path(inputDirStr);
+ remoteFs.mkdirs(inputDir);
+ String outputDirStr = "/tmp/owc-output";
+ outputPaths[0] = outputDirStr;
job.run(tezConf, new String[] { StringUtils.join(",", inputPaths),
StringUtils.join(",", outputPaths), "2" }, null);
- fail("Job submission should have thrown an exception");
- } catch(IOException e) {
+ fail("Job submission should have failed");
+ } catch (SessionNotRunning e) {
+ // Expected
+ LOG.info("Session not running", e);
+ } catch (IOException e) {
Assert.assertTrue(e.getMessage().contains("Failed to submit application to YARN"));
} finally {
if (yarnClient != null) {
@@ -707,6 +745,7 @@ public class TestTezJobs {
}
+
@Test (timeout=60000)
public void testVertexOrder() throws Exception {
TezConfiguration tezConf = new TezConfiguration(mrrTezCluster.getConfig());