From 6812de1c81c8ce638916070af9a2846f5140a02e Mon Sep 17 00:00:00 2001 From: seonghyun Date: Fri, 27 Sep 2019 15:34:19 +0900 Subject: [PATCH] Modify test case --- .../openwhisk/core/controller/test/ActionsApiTests.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/src/test/scala/org/apache/openwhisk/core/controller/test/ActionsApiTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/ActionsApiTests.scala index 0b2ebded7cf..0902410b647 100644 --- a/tests/src/test/scala/org/apache/openwhisk/core/controller/test/ActionsApiTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/core/controller/test/ActionsApiTests.scala @@ -228,7 +228,8 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi { implicit val tid = transid() val action = WhiskAction(namespace, aname(), jsDefault("")) - val dummyUpdated = 1569400000000L; + val dummyUpdated = WhiskEntity.currentMillis().toEpochMilli + val content = JsObject( "exec" -> JsObject("code" -> "".toJson, "kind" -> action.exec.kind.toJson), "updated" -> dummyUpdated.toJson) @@ -236,7 +237,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi { Put(s"$collectionPath/${action.name}", content) ~> Route.seal(routes(creds)) ~> check { status should be(OK) val response = responseAs[WhiskAction] - response.updated.toEpochMilli should not be (dummyUpdated) + response.updated.toEpochMilli should be > dummyUpdated } }