فهرست منبع

[livy] Fix livy tests

Erick Tryzelaar 10 سال پیش
والد
کامیت
e8c51d7

+ 4 - 4
apps/spark/java/livy-server/src/test/scala/com/cloudera/hue/livy/server/StatementSpec.scala

@@ -60,18 +60,18 @@ class StatementSpec extends FunSpec with Matchers {
         "status" -> "ok",
         "execution_count" -> 0,
         "data" -> Map(
-          "appliaction/json" -> List(1, 2, 3, 4)
+          "application/json" -> List(1, 2, 3, 4)
         )
       ))
       val stmt = new Statement(0, ExecuteRequest(""), Future.successful(rep))
       var output = Await.result(stmt.output(), Duration.Inf)
-      (output \ "data" \ "text/plain").extract[List[Int]] should equal (List(1, 2, 3, 4))
+      (output \ "data" \ "application/json").extract[List[Int]] should equal (List(1, 2, 3, 4))
 
       output = Await.result(stmt.output(Some(2)), Duration.Inf)
-      (output \ "data" \ "text/plain").extract[List[Int]] should equal (List(3, 4))
+      (output \ "data" \ "application/json").extract[List[Int]] should equal (List(3, 4))
 
       output = Await.result(stmt.output(Some(2), Some(1)), Duration.Inf)
-      (output \ "data" \ "text/plain").extract[List[Int]] should equal (List(3))
+      (output \ "data" \ "application/json").extract[List[Int]] should equal (List(3))
     }
   }
 

+ 1 - 3
apps/spark/java/livy-server/src/test/scala/com/cloudera/hue/livy/server/batches/BatchServletSpec.scala

@@ -100,9 +100,7 @@ class BatchServletSpec extends ScalatraSuite with FunSpecLike with BeforeAndAfte
         val parsedBody = parse(body)
         parsedBody \ "id" should equal (JInt(0))
         parsedBody \ "state" should equal (JString("success"))
-        parsedBody \ "lines" should equal (JArray(List(
-          JString("hello world")
-        )))
+        (parsedBody \ "lines").extract[List[String]] should contain ("hello world")
 
         val batch = batchManager.getBatch(0)
         batch should be (defined)