You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/10/16 17:18:29 UTC

[GitHub] houshengbo closed pull request #85: Remove the build of swift 3.1.1 in travis

houshengbo closed pull request #85: Remove the build of swift 3.1.1 in travis
URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/85
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tests/src/test/scala/runtime/actionContainers/Swift311ActionContainerTests.scala b/tests/src/test/scala/runtime/actionContainers/Swift311ActionContainerTests.scala
deleted file mode 100644
index cf8ede6..0000000
--- a/tests/src/test/scala/runtime/actionContainers/Swift311ActionContainerTests.scala
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * 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
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-package runtime.actionContainers
-
-import org.junit.runner.RunWith
-import org.scalatest.junit.JUnitRunner
-import spray.json.JsObject
-import spray.json.JsString
-@RunWith(classOf[JUnitRunner])
-class Swift311ActionContainerTests extends SwiftActionContainerTests {
-
-  override lazy val swiftContainerImageName = "action-swift-v3.1.1"
-  override lazy val swiftBinaryName = "tests/dat/build/swift311/HelloSwift3.zip"
-
-  // issue https://github.com/apache/incubator-openwhisk-runtime-swift/issues/74
-  override val testLargeInput = TestConfig("", skipTest = true)
-
-  lazy val watsonCode = """
-        | import AlchemyDataNewsV1
-        | import ConversationV1
-        | import DiscoveryV1
-        | import DocumentConversionV1
-        | import NaturalLanguageClassifierV1
-        | import NaturalLanguageUnderstandingV1
-        | import PersonalityInsightsV3
-        | import RetrieveAndRankV1
-        | import ToneAnalyzerV3
-        | import TradeoffAnalyticsV1
-        | import VisualRecognitionV3
-        |
-        | func main(args: [String:Any]) -> [String:Any] {
-        |     return ["message": "I compiled and was able to import Watson SDKs"]
-        | }
-    """.stripMargin
-
-  val httpCode = """
-         | import KituraNet
-         | import Foundation
-         | import Dispatch
-         | func main(args:[String: Any]) -> [String:Any] {
-         |       let retries = 3
-         |       var resp = [String:Any]()
-         |       var attempts = 0
-         |       if let url = args["getUrl"] as? String {
-         |           while attempts < retries {
-         |               let group = DispatchGroup()
-         |               let queue = DispatchQueue.global(qos: .default)
-         |               group.enter()
-         |               queue.async {
-         |                   HTTP.get(url, callback: { response in
-         |                       if let response = response {
-         |                           do {
-         |                               var jsonData = Data()
-         |                               try response.readAllData(into: &jsonData)
-         |                               if let dic = WhiskJsonUtils.jsonDataToDictionary(jsonData: jsonData) {
-         |                                   resp = dic
-         |                               } else {
-         |                                   resp = ["error":"response from server is not JSON"]
-         |                               }
-         |                           } catch {
-         |                              resp["error"] = error.localizedDescription
-         |                           }
-         |                       }
-         |                       group.leave()
-         |                   })
-         |               }
-         |            switch group.wait(timeout: DispatchTime.distantFuture) {
-         |                case DispatchTimeoutResult.success:
-         |                    resp["attempts"] = attempts
-         |                    return resp
-         |                case DispatchTimeoutResult.timedOut:
-         |                    attempts = attempts + 1
-         |            }
-         |        }
-         |     }
-         |     return ["status":"Exceeded \(retries) attempts, aborting."]
-         | }
-       """.stripMargin
-
-  it should "properly use KituraNet and Dispatch" in {
-    val (out, err) = withActionContainer() { c =>
-      val code = """
-          | import KituraNet
-          | import Foundation
-          | import Dispatch
-          | func main(args:[String: Any]) -> [String:Any] {
-          |       let retries = 3
-          |       var resp = [String:Any]()
-          |       var attempts = 0
-          |       if let url = args["getUrl"] as? String {
-          |           while attempts < retries {
-          |               let group = DispatchGroup()
-          |               let queue = DispatchQueue.global(qos: .default)
-          |               group.enter()
-          |               queue.async {
-          |                   HTTP.get(url, callback: { response in
-          |                       if let response = response {
-          |                           do {
-          |                               var jsonData = Data()
-          |                               try response.readAllData(into: &jsonData)
-          |                               if let dic = WhiskJsonUtils.jsonDataToDictionary(jsonData: jsonData) {
-          |                                   resp = dic
-          |                               } else {
-          |                                   resp = ["error":"response from server is not JSON"]
-          |                               }
-          |                           } catch {
-          |                              resp["error"] = error.localizedDescription
-          |                           }
-          |                       }
-          |                       group.leave()
-          |                   })
-          |               }
-          |            switch group.wait(timeout: DispatchTime.distantFuture) {
-          |                case DispatchTimeoutResult.success:
-          |                    resp["attempts"] = attempts
-          |                    return resp
-          |                case DispatchTimeoutResult.timedOut:
-          |                    attempts = attempts + 1
-          |            }
-          |        }
-          |     }
-          |     return ["status":"Exceeded \(retries) attempts, aborting."]
-          | }
-      """.stripMargin
-
-      val (initCode, _) = c.init(initPayload(code))
-
-      initCode should be(200)
-
-      val argss = List(JsObject("getUrl" -> JsString("https://openwhisk.ng.bluemix.net/api/v1")))
-
-      for (args <- argss) {
-        val (runCode, out) = c.run(runPayload(args))
-        runCode should be(200)
-      }
-    }
-
-    // in side try catch finally print (out file)
-    // in catch block an error has occurred, get docker logs and print
-    // throw
-
-    checkStreams(out, err, {
-      case (o, e) =>
-        if (enforceEmptyOutputStream) o shouldBe empty
-        e shouldBe empty
-    })
-  }
-
-  it should "make Watson SDKs available to action authors" in {
-    val (out, err) = withActionContainer() { c =>
-      val code = watsonCode
-
-      val (initCode, _) = c.init(initPayload(code))
-
-      initCode should be(200)
-
-      val (runCode, out) = c.run(runPayload(JsObject()))
-      runCode should be(200)
-    }
-
-    checkStreams(out, err, {
-      case (o, e) =>
-        if (enforceEmptyOutputStream) o shouldBe empty
-        e shouldBe empty
-    })
-  }
-}
diff --git a/tests/src/test/scala/runtime/sdk/Swift311SDKTests.scala b/tests/src/test/scala/runtime/sdk/Swift311SDKTests.scala
deleted file mode 100644
index 7cf9b06..0000000
--- a/tests/src/test/scala/runtime/sdk/Swift311SDKTests.scala
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-package runtime.sdk
-
-import org.junit.runner.RunWith
-import org.scalatest.junit.JUnitRunner
-
-@RunWith(classOf[JUnitRunner])
-class Swift311SDKTests extends SwiftSDKTests {
-  override lazy val actionKind = "swift:3.1.1"
-}
diff --git a/tools/travis/build.sh b/tools/travis/build.sh
index 50d47a0..b8ac9ad 100755
--- a/tools/travis/build.sh
+++ b/tools/travis/build.sh
@@ -49,6 +49,5 @@ TERM=dumb ./gradlew install
 # Build runtime
 cd $ROOTDIR
 TERM=dumb ./gradlew \
-:core:swift3.1.1Action:distDocker \
 :core:swift41Action:distDocker \
 -PdockerImagePrefix=${IMAGE_PREFIX}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services