You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by du...@apache.org on 2018/04/17 14:12:34 UTC
[incubator-openwhisk] branch master updated: Update akka to 2.5.12
and akka-http to 10.1.1. (#3495)
This is an automated email from the ASF dual-hosted git repository.
dubeejw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new 1104b3f Update akka to 2.5.12 and akka-http to 10.1.1. (#3495)
1104b3f is described below
commit 1104b3f92cf9329ba31181a6a6ef0388f7022349
Author: Markus Thömmes <ma...@me.com>
AuthorDate: Tue Apr 17 16:12:30 2018 +0200
Update akka to 2.5.12 and akka-http to 10.1.1. (#3495)
The newest akka-http contains a new connection-pool implementation which we can make use of to stabilize our akka-http based clients (most notably couchdb).
---
common/scala/build.gradle | 12 ++++++------
.../src/main/scala/whisk/core/entity/ArgNormalizer.scala | 8 ++------
core/controller/build.gradle | 1 -
tests/build.gradle | 5 ++---
tests/src/test/scala/common/BaseWsk.scala | 4 +---
tests/src/test/scala/common/rest/WskRest.scala | 3 ---
tests/src/test/scala/system/basic/WskActionTests.scala | 2 --
tests/src/test/scala/system/basic/WskBasicSwift3Tests.scala | 4 +---
tests/src/test/scala/system/basic/WskConductorTests.scala | 2 --
tests/src/test/scala/system/basic/WskConsoleTests.scala | 5 ++---
tests/src/test/scala/system/rest/ActionSchemaTests.scala | 4 +---
tests/src/test/scala/system/rest/RestUtil.scala | 4 +---
tests/src/test/scala/whisk/core/cli/test/Swift311Tests.scala | 4 ++--
.../scala/whisk/core/connector/test/MessageFeedTests.scala | 8 ++++----
.../whisk/core/containerpool/test/ContainerPoolTests.scala | 6 +++---
.../whisk/core/database/test/CleanUpActivationsTest.scala | 3 +--
.../whisk/core/entity/test/ActivationResponseTests.scala | 3 +--
17 files changed, 27 insertions(+), 51 deletions(-)
diff --git a/common/scala/build.gradle b/common/scala/build.gradle
index c907bd0..6c856c2 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 6667639..3b1894c 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 0b90444..2a184d1 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 df0ab0d..264e3b3 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 1bef64b..8a1611a 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 fb12172..395047e 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 31ceb28..31cc186 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 1711f8e..914ef92 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 7115104..aa4c5b6 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 d03d346..2d6f0fc 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 b88b231..8db3259 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 b5dddb1..fe2a564 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 26ed58d..a7e6eeb 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 048554f..67e66e8 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 e41cea6..b61e6f8 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 997397f..f224042 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 0324c03..6e38877 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
--
To stop receiving notification emails like this one, please contact
dubeejw@apache.org.