Skip to content

Commit 41fb705

Browse files
committed
Update Sentinel to Akka 2.2 Final
1 parent 021870a commit 41fb705

File tree

5 files changed

+14
-28
lines changed

5 files changed

+14
-28
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ In its current state, it's being used internally as a platform to test performan
1313

1414
## Status
1515

16-
Since the IO layer (and its API) in Akka 2.2 isn't stable yet, the current codebase of Sentinel can and will change heavily until the release of Akka 2.2.
17-
18-
In overall, treat Sentinel as pre-release alpha software (you've been warned ;-).
16+
The current codebase of Sentinel can change heavily over releases.
17+
In overall, treat Sentinel as pre-release alpha software.
1918

2019
**Currently available in Sentinel:**
2120

@@ -48,7 +47,7 @@ Or by adding the repo:
4847
to your SBT configuration and adding the `SNAPSHOT` to your library dependencies:
4948

5049
<notextile><pre><code>libraryDependencies ++= Seq(
51-
"nl.gideondk" %% "sentinel" % "0.5.2"
50+
"nl.gideondk" %% "sentinel" % "0.5.4"
5251
)
5352
</code></pre></notextile>
5453

project/Build.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ object ApplicationBuild extends Build {
88
override lazy val settings = super.settings ++
99
Seq(
1010
name := "sentinel",
11-
version := "0.5.3",
11+
version := "0.5.4",
1212
organization := "nl.gideondk",
1313
scalaVersion := "2.10.2",
1414
parallelExecution in Test := false,
@@ -30,7 +30,7 @@ object ApplicationBuild extends Build {
3030

3131
"com.typesafe.play" %% "play-iteratees" % "2.2-akka22-SNAPSHOT",
3232

33-
"com.typesafe.akka" % "akka-actor_2.10" % "2.2.0-RC2"
33+
"com.typesafe.akka" % "akka-actor_2.10" % "2.2.0"
3434
)
3535

3636
lazy val root = Project(id = "sentinel",

src/main/resources/application.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
akka.log-dead-letters-during-shutdown = off
2+
akka.log-dead-letters = off

src/test/scala/nl/gideondk/sentinel/LargerPayloadSpec.scala

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ class LargerPayloadSpec extends Specification with LargerPayloadWorkers {
5151
val num = 500
5252
val fut = sendActionsForBS(bs, num).unsafePerformIO
5353

54-
BenchmarkHelpers.throughput("Sending " + num + " requests of " + bs.length / 1024.0 / 1024.0 + " mb", bs.length / 1024.0 / 1024.0, num) {
55-
Await.result(fut, Duration.apply(20, scala.concurrent.duration.SECONDS))
56-
}
54+
Await.result(fut, Duration.apply(20, scala.concurrent.duration.SECONDS))
5755
true
5856
}
5957
}
@@ -64,10 +62,7 @@ class LargerPayloadSpec extends Specification with LargerPayloadWorkers {
6462
val num = 50
6563
val fut = sendActionsForBS(bs, num).unsafePerformIO
6664

67-
BenchmarkHelpers.throughput("Sending " + num + " requests of " + bs.length / 1024.0 / 1024.0 + " mb", bs.length / 1024.0 / 1024.0, num) {
68-
Await.result(fut, Duration.apply(20, scala.concurrent.duration.SECONDS))
69-
true
70-
}
65+
Await.result(fut, Duration.apply(20, scala.concurrent.duration.SECONDS))
7166
true
7267
}
7368
}
@@ -78,9 +73,7 @@ class LargerPayloadSpec extends Specification with LargerPayloadWorkers {
7873
val num = 20
7974
val fut = sendActionsForBS(bs, num).unsafePerformIO
8075

81-
BenchmarkHelpers.throughput("Sending " + num + " requests of " + bs.length / 1024.0 / 1024.0 + " mb", bs.length / 1024.0 / 1024.0, num) {
82-
Await.result(fut, Duration.apply(20, scala.concurrent.duration.SECONDS))
83-
}
76+
Await.result(fut, Duration.apply(20, scala.concurrent.duration.SECONDS))
8477
true
8578
}
8679
}
@@ -91,9 +84,7 @@ class LargerPayloadSpec extends Specification with LargerPayloadWorkers {
9184
val num = 5
9285
val fut = sendActionsForBS(bs, num).unsafePerformIO
9386

94-
BenchmarkHelpers.throughput("Sending " + num + " requests of " + bs.length / 1024.0 / 1024.0 + " mb", bs.length / 1024.0 / 1024.0, num) {
95-
Await.result(fut, Duration.apply(20, scala.concurrent.duration.SECONDS))
96-
}
87+
Await.result(fut, Duration.apply(20, scala.concurrent.duration.SECONDS))
9788
true
9889
}
9990
}
@@ -104,9 +95,7 @@ class LargerPayloadSpec extends Specification with LargerPayloadWorkers {
10495
val num = 2
10596
val fut = sendActionsForBS(bs, num).unsafePerformIO
10697

107-
BenchmarkHelpers.throughput("Sending " + num + " requests of " + bs.length / 1024.0 / 1024.0 + " mb", bs.length / 1024.0 / 1024.0, num) {
108-
Await.result(fut, Duration.apply(20, scala.concurrent.duration.SECONDS))
109-
}
98+
Await.result(fut, Duration.apply(20, scala.concurrent.duration.SECONDS))
11099
true
111100
}
112101
}

src/test/scala/nl/gideondk/sentinel/PingPongSpec.scala

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,16 @@ class PingPongSpec extends Specification with PingPongWorkers {
7070
v.isFailure
7171
}
7272

73-
"be able to ping to the server in timely fashion" in {
73+
"server and client be able to handle multiple concurrent requests" in {
7474
val num = 200000
7575

7676
val mulActs = for (i 1 to num) yield (pingClient <~< PingPongMessageFormat("PING"))
7777
val tasks = Task.sequenceSuccesses(mulActs.toList)
7878

7979
val fut = tasks.start
80-
BenchmarkHelpers.timed("Ping-Ponging " + num + " requests", num) {
81-
val res = Await.result(fut, Duration(10, scala.concurrent.duration.SECONDS))
82-
true
83-
}
8480

8581
val res = Await.result(fut, Duration(10, scala.concurrent.duration.SECONDS))
86-
res.get.filterNot(_ == PingPongMessageFormat("PONG")).length == 0
82+
res.get.length == num && res.get.filterNot(_ == PingPongMessageFormat("PONG")).length == 0
8783
}
8884
}
8985

0 commit comments

Comments
 (0)