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/04/17 14:12:33 UTC

[GitHub] dubee closed pull request #3495: Update akka to 2.5.12 and akka-http to 10.1.1.

dubee closed pull request #3495: Update akka to 2.5.12 and akka-http to 10.1.1.
URL: https://github.com/apache/incubator-openwhisk/pull/3495
 
 
   

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/common/scala/build.gradle b/common/scala/build.gradle
index c907bd05bb..6c856c22c1 100644
--- a/common/scala/build.gradle
+++ b/common/scala/build.gradle
@@ -15,14 +15,14 @@ dependencies {
     compile "org.scala-lang:scala-library:${gradle.scala.version}"
 
     compile 'com.github.pureconfig:pureconfig_2.11:0.9.0'
-    compile 'io.spray:spray-json_2.11:1.3.3'
+    compile 'io.spray:spray-json_2.11:1.3.4'
 
-    compile 'com.typesafe.akka:akka-actor_2.11:2.5.6'
-    compile 'com.typesafe.akka:akka-stream_2.11:2.5.6'
-    compile 'com.typesafe.akka:akka-slf4j_2.11:2.5.6'
+    compile 'com.typesafe.akka:akka-actor_2.11:2.5.12'
+    compile 'com.typesafe.akka:akka-stream_2.11:2.5.12'
+    compile 'com.typesafe.akka:akka-slf4j_2.11:2.5.12'
 
-    compile 'com.typesafe.akka:akka-http-core_2.11:10.0.10'
-    compile 'com.typesafe.akka:akka-http-spray-json_2.11:10.0.10'
+    compile 'com.typesafe.akka:akka-http-core_2.11:10.1.1'
+    compile 'com.typesafe.akka:akka-http-spray-json_2.11:10.1.1'
 
     compile 'com.lightbend.akka:akka-stream-alpakka-file_2.11:0.15'
 
diff --git a/common/scala/src/main/scala/whisk/core/entity/ArgNormalizer.scala b/common/scala/src/main/scala/whisk/core/entity/ArgNormalizer.scala
index 66676397f3..3b1894c971 100644
--- a/common/scala/src/main/scala/whisk/core/entity/ArgNormalizer.scala
+++ b/common/scala/src/main/scala/whisk/core/entity/ArgNormalizer.scala
@@ -17,18 +17,14 @@
 
 package whisk.core.entity
 
-import spray.json.RootJsonFormat
-import spray.json.pimpString
-import spray.json.JsString
+import spray.json._
 import scala.util.Try
 
 protected[entity] trait ArgNormalizer[T] {
 
   protected[core] val serdes: RootJsonFormat[T]
 
-  protected[entity] def factory(s: String): T = {
-    serdes.read(Try { s.parseJson } getOrElse JsString(s))
-  }
+  protected[entity] def factory(s: String): T = serdes.read(Try(s.parseJson).getOrElse(JsString(s)))
 
   /**
    * Creates a new T from string. The method checks that a string
diff --git a/core/controller/build.gradle b/core/controller/build.gradle
index 0b904440af..2a184d15d7 100644
--- a/core/controller/build.gradle
+++ b/core/controller/build.gradle
@@ -14,7 +14,6 @@ repositories {
 }
 
 dependencies {
-    compile 'com.typesafe.akka:akka-distributed-data_2.11:2.5.4'
     compile "org.scala-lang:scala-library:${gradle.scala.version}"
     compile project(':common:scala')
 }
diff --git a/tests/build.gradle b/tests/build.gradle
index df0ab0dce0..264e3b384e 100644
--- a/tests/build.gradle
+++ b/tests/build.gradle
@@ -61,11 +61,10 @@ dependencies {
     compile 'junit:junit:4.11'
     compile 'com.jayway.restassured:rest-assured:2.6.0'
     compile 'org.scalatest:scalatest_2.11:3.0.1'
-    compile 'com.typesafe.akka:akka-testkit_2.11:2.5.4'
+    compile 'com.typesafe.akka:akka-testkit_2.11:2.5.12'
     compile 'com.google.code.gson:gson:2.3.1'
     compile 'org.scalamock:scalamock-scalatest-support_2.11:3.4.2'
-    compile 'com.typesafe.akka:akka-testkit_2.11:2.4.16'
-    compile 'com.typesafe.akka:akka-http-testkit_2.11:10.0.10'
+    compile 'com.typesafe.akka:akka-http-testkit_2.11:10.1.1'
     compile 'com.github.java-json-tools:json-schema-validator:2.2.8'
     compile "org.mockito:mockito-core:2.15.0"
 
diff --git a/tests/src/test/scala/common/BaseWsk.scala b/tests/src/test/scala/common/BaseWsk.scala
index 1bef64b566..8a1611ae1e 100644
--- a/tests/src/test/scala/common/BaseWsk.scala
+++ b/tests/src/test/scala/common/BaseWsk.scala
@@ -29,9 +29,7 @@ import scala.language.postfixOps
 import org.scalatest.Matchers
 
 import TestUtils._
-import spray.json.JsObject
-import spray.json.JsValue
-import spray.json.pimpString
+import spray.json._
 import whisk.core.entity.ByteSize
 
 case class WskProps(
diff --git a/tests/src/test/scala/common/rest/WskRest.scala b/tests/src/test/scala/common/rest/WskRest.scala
index fb12172fed..395047efc4 100644
--- a/tests/src/test/scala/common/rest/WskRest.scala
+++ b/tests/src/test/scala/common/rest/WskRest.scala
@@ -57,9 +57,6 @@ import akka.http.scaladsl.HttpsConnectionContext
 import akka.stream.ActorMaterializer
 import spray.json._
 import spray.json.DefaultJsonProtocol._
-import spray.json.JsObject
-import spray.json.JsValue
-import spray.json.pimpString
 import common._
 import common.BaseDeleteFromCollection
 import common.BaseListOrGetFromCollection
diff --git a/tests/src/test/scala/system/basic/WskActionTests.scala b/tests/src/test/scala/system/basic/WskActionTests.scala
index 31ceb28177..31cc186258 100644
--- a/tests/src/test/scala/system/basic/WskActionTests.scala
+++ b/tests/src/test/scala/system/basic/WskActionTests.scala
@@ -30,8 +30,6 @@ import common.WskProps
 import common.WskTestHelpers
 import spray.json._
 import spray.json.DefaultJsonProtocol._
-import spray.json.JsObject
-import spray.json.pimpAny
 
 @RunWith(classOf[JUnitRunner])
 abstract class WskActionTests extends TestHelpers with WskTestHelpers with JsHelpers {
diff --git a/tests/src/test/scala/system/basic/WskBasicSwift3Tests.scala b/tests/src/test/scala/system/basic/WskBasicSwift3Tests.scala
index 1711f8ee7f..914ef92f34 100644
--- a/tests/src/test/scala/system/basic/WskBasicSwift3Tests.scala
+++ b/tests/src/test/scala/system/basic/WskBasicSwift3Tests.scala
@@ -26,10 +26,8 @@ import common.TestUtils
 import common.BaseWsk
 import common.WskProps
 import common.WskTestHelpers
-import spray.json.pimpString
-import spray.json.JsString
+import spray.json._
 import common.TestUtils.RunResult
-import spray.json.JsObject
 
 @RunWith(classOf[JUnitRunner])
 abstract class WskBasicSwift3Tests extends TestHelpers with WskTestHelpers with JsHelpers {
diff --git a/tests/src/test/scala/system/basic/WskConductorTests.scala b/tests/src/test/scala/system/basic/WskConductorTests.scala
index 7115104462..aa4c5b6b9c 100644
--- a/tests/src/test/scala/system/basic/WskConductorTests.scala
+++ b/tests/src/test/scala/system/basic/WskConductorTests.scala
@@ -34,8 +34,6 @@ import common.WskTestHelpers
 
 import spray.json._
 import spray.json.DefaultJsonProtocol._
-import spray.json.JsObject
-import spray.json.pimpAny
 
 import whisk.core.entity.size.SizeInt
 import whisk.core.WhiskConfig
diff --git a/tests/src/test/scala/system/basic/WskConsoleTests.scala b/tests/src/test/scala/system/basic/WskConsoleTests.scala
index d03d346e89..2d6f0fcbbb 100644
--- a/tests/src/test/scala/system/basic/WskConsoleTests.scala
+++ b/tests/src/test/scala/system/basic/WskConsoleTests.scala
@@ -32,9 +32,8 @@ import common.TestUtils
 import common.BaseWsk
 import common.WskProps
 import common.WskTestHelpers
-import spray.json.DefaultJsonProtocol.IntJsonFormat
-import spray.json.DefaultJsonProtocol.StringJsonFormat
-import spray.json.pimpAny
+import spray.json.DefaultJsonProtocol._
+import spray.json._
 
 /**
  * Tests of the text console
diff --git a/tests/src/test/scala/system/rest/ActionSchemaTests.scala b/tests/src/test/scala/system/rest/ActionSchemaTests.scala
index b88b231887..8db325948d 100644
--- a/tests/src/test/scala/system/rest/ActionSchemaTests.scala
+++ b/tests/src/test/scala/system/rest/ActionSchemaTests.scala
@@ -32,9 +32,7 @@ import common.WhiskProperties
 import common.rest.WskRest
 import common.WskProps
 import common.WskTestHelpers
-import spray.json.JsArray
-import spray.json.JsObject
-import spray.json.pimpString
+import spray.json._
 
 /**
  * Basic tests of API calls for actions
diff --git a/tests/src/test/scala/system/rest/RestUtil.scala b/tests/src/test/scala/system/rest/RestUtil.scala
index b5dddb1f6a..fe2a564288 100644
--- a/tests/src/test/scala/system/rest/RestUtil.scala
+++ b/tests/src/test/scala/system/rest/RestUtil.scala
@@ -24,9 +24,7 @@ import com.jayway.restassured.config.RestAssuredConfig
 import com.jayway.restassured.config.SSLConfig
 
 import common.WhiskProperties
-import spray.json.JsObject
-import spray.json.JsValue
-import spray.json.pimpString
+import spray.json._
 
 /**
  * Utilities for REST tests
diff --git a/tests/src/test/scala/whisk/core/cli/test/Swift311Tests.scala b/tests/src/test/scala/whisk/core/cli/test/Swift311Tests.scala
index 26ed58d05f..a7e6eeba1c 100644
--- a/tests/src/test/scala/whisk/core/cli/test/Swift311Tests.scala
+++ b/tests/src/test/scala/whisk/core/cli/test/Swift311Tests.scala
@@ -26,8 +26,8 @@ import common.TestUtils
 import common.rest.WskRest
 import common.WskProps
 import common.WskTestHelpers
-import spray.json.DefaultJsonProtocol.StringJsonFormat
-import spray.json.pimpAny
+import spray.json.DefaultJsonProtocol._
+import spray.json._
 
 @RunWith(classOf[JUnitRunner])
 class Swift311Tests extends TestHelpers with WskTestHelpers with Matchers {
diff --git a/tests/src/test/scala/whisk/core/connector/test/MessageFeedTests.scala b/tests/src/test/scala/whisk/core/connector/test/MessageFeedTests.scala
index 048554fa2e..67e66e8592 100644
--- a/tests/src/test/scala/whisk/core/connector/test/MessageFeedTests.scala
+++ b/tests/src/test/scala/whisk/core/connector/test/MessageFeedTests.scala
@@ -146,7 +146,7 @@ class MessageFeedTests
     connector.expectMsg(Transition(connector.fsm, FillingPipeline, DrainingPipeline))
 
     connector.peekCount.get shouldBe peeks
-    connector.expectNoMsg(500.milliseconds)
+    connector.expectNoMessage(500.milliseconds)
   }
 
   it should "transition from drain to fill mode" in {
@@ -163,7 +163,7 @@ class MessageFeedTests
 
     // stay in drain mode, no more peeking
     timeout(connector.fsm) // should be ignored
-    connector.expectNoMsg(500.milliseconds)
+    connector.expectNoMessage(500.milliseconds)
     connector.peekCount.get shouldBe peeks // no new reads
 
     // expecting overflow of 2 in the queue, which is true if all expected messages were sent
@@ -171,7 +171,7 @@ class MessageFeedTests
 
     // drain one, should stay in draining state
     connector.fsm ! Processed
-    connector.expectNoMsg(500.milliseconds)
+    connector.expectNoMessage(500.milliseconds)
     connector.peekCount.get shouldBe peeks // no new reads
 
     // back to fill mode
@@ -183,6 +183,6 @@ class MessageFeedTests
     connector.fill(1)
     connector.expectMsg(Transition(connector.fsm, FillingPipeline, DrainingPipeline))
 
-    connector.expectNoMsg(500.milliseconds)
+    connector.expectNoMessage(500.milliseconds)
   }
 }
diff --git a/tests/src/test/scala/whisk/core/containerpool/test/ContainerPoolTests.scala b/tests/src/test/scala/whisk/core/containerpool/test/ContainerPoolTests.scala
index e41cea6895..b61e6f8db0 100644
--- a/tests/src/test/scala/whisk/core/containerpool/test/ContainerPoolTests.scala
+++ b/tests/src/test/scala/whisk/core/containerpool/test/ContainerPoolTests.scala
@@ -131,7 +131,7 @@ class ContainerPoolTests
 
     pool ! runMessage
     containers(0).expectMsg(runMessage)
-    containers(1).expectNoMsg(100.milliseconds)
+    containers(1).expectNoMessage(100.milliseconds)
   }
 
   it should "reuse a warm container when action is the same even if revision changes" in within(timeout) {
@@ -145,7 +145,7 @@ class ContainerPoolTests
 
     pool ! runMessageDifferentVersion
     containers(0).expectMsg(runMessageDifferentVersion)
-    containers(1).expectNoMsg(100.milliseconds)
+    containers(1).expectNoMessage(100.milliseconds)
   }
 
   it should "create a container if it cannot find a matching container" in within(timeout) {
@@ -227,7 +227,7 @@ class ContainerPoolTests
     containers(0).expectMsg(runMessage)
     containers(0).send(pool, RescheduleJob) // emulate container failure ...
     containers(0).send(pool, runMessage) // ... causing job to be rescheduled
-    feed.expectNoMsg(100.millis)
+    feed.expectNoMessage(100.millis)
     containers(1).expectMsg(runMessage) // job resent to new actor
   }
 
diff --git a/tests/src/test/scala/whisk/core/database/test/CleanUpActivationsTest.scala b/tests/src/test/scala/whisk/core/database/test/CleanUpActivationsTest.scala
index 997397fe87..f2240427d5 100644
--- a/tests/src/test/scala/whisk/core/database/test/CleanUpActivationsTest.scala
+++ b/tests/src/test/scala/whisk/core/database/test/CleanUpActivationsTest.scala
@@ -37,8 +37,7 @@ import common.WaitFor
 import common.WhiskProperties
 import common.WskActorSystem
 import spray.json.DefaultJsonProtocol._
-import spray.json.JsObject
-import spray.json.pimpAny
+import spray.json._
 
 @RunWith(classOf[JUnitRunner])
 class CleanUpActivationsTest
diff --git a/tests/src/test/scala/whisk/core/entity/test/ActivationResponseTests.scala b/tests/src/test/scala/whisk/core/entity/test/ActivationResponseTests.scala
index 0324c032c1..6e388773d1 100644
--- a/tests/src/test/scala/whisk/core/entity/test/ActivationResponseTests.scala
+++ b/tests/src/test/scala/whisk/core/entity/test/ActivationResponseTests.scala
@@ -22,8 +22,7 @@ import org.junit.runner.RunWith
 import org.scalatest.FlatSpec
 import org.scalatest.Matchers
 import org.scalatest.junit.JUnitRunner
-import spray.json.pimpAny
-import spray.json.pimpString
+import spray.json._
 import whisk.common.PrintStreamLogging
 import whisk.core.entity.ActivationResponse._
 import whisk.core.entity.size.SizeInt


 

----------------------------------------------------------------
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