You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2013/11/07 20:08:33 UTC
[2/4] git commit: very basic regression test to make sure appId
doesnt get dropped in future
very basic regression test to make sure appId doesnt get dropped in future
Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/8d3cdda9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/8d3cdda9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/8d3cdda9
Branch: refs/heads/master
Commit: 8d3cdda9a22a23794c0cd12b15279a80a31952e3
Parents: 36e832b
Author: Imran Rashid <im...@quantifind.com>
Authored: Thu Nov 7 01:35:48 2013 -0600
Committer: Imran Rashid <im...@quantifind.com>
Committed: Thu Nov 7 01:35:48 2013 -0600
----------------------------------------------------------------------
.../spark/deploy/worker/ExecutorRunnerTest.scala | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/8d3cdda9/core/src/test/scala/org/apache/spark/deploy/worker/ExecutorRunnerTest.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/org/apache/spark/deploy/worker/ExecutorRunnerTest.scala b/core/src/test/scala/org/apache/spark/deploy/worker/ExecutorRunnerTest.scala
new file mode 100644
index 0000000..a3111e2
--- /dev/null
+++ b/core/src/test/scala/org/apache/spark/deploy/worker/ExecutorRunnerTest.scala
@@ -0,0 +1,18 @@
+package org.apache.spark.deploy.worker
+
+import org.scalatest.FunSuite
+import org.apache.spark.deploy.{ExecutorState, Command, ApplicationDescription}
+import java.io.File
+
+class ExecutorRunnerTest extends FunSuite {
+
+ test("command includes appId") {
+ def f(s:String) = new File(s)
+ val sparkHome = sys.props("user.dir")
+ val appDesc = new ApplicationDescription("app name", 8, 500, Command("foo", Seq(),Map()), sparkHome, "appUiUrl")
+ val appId = "12345-worker321-9876"
+ val er = new ExecutorRunner(appId, 1, appDesc, 8, 500, null, "blah", "worker321", f(sparkHome), f("ooga"), ExecutorState.RUNNING)
+
+ assert(er.buildCommandSeq().last === appId)
+ }
+}