format the code

* just a clean test:compile
* and fixing the tweets Source
This commit is contained in:
Patrik Nordwall 2016-05-10 11:38:46 +02:00
parent 10a252d9ed
commit d5a3b26291
5 changed files with 13 additions and 12 deletions

View file

@ -3,7 +3,7 @@ package akka.cluster.pubsub
import akka.testkit._
import akka.routing.{ ConsistentHashingRoutingLogic, RouterEnvelope }
import org.scalatest.WordSpecLike
import akka.actor.{DeadLetter, ActorRef}
import akka.actor.{ DeadLetter, ActorRef }
import com.typesafe.config.ConfigFactory
case class WrappedMessage(msg: String) extends RouterEnvelope {

View file

@ -7,7 +7,7 @@ package docs.http.scaladsl.server.directives
import akka.http.scaladsl.model.ContentTypes._
import akka.http.scaladsl.model._
import akka.http.scaladsl.model.headers.`Content-Type`
import akka.http.scaladsl.server.{Route, ValidationRejection}
import akka.http.scaladsl.server.{ Route, ValidationRejection }
import akka.testkit.EventFilter
import docs.http.scaladsl.server.RoutingSpec

View file

@ -31,12 +31,13 @@ object TwitterStreamQuickstartDocSpec {
val akka = Hashtag("#akka")
//#model
// format: OFF
//#tweet-source
val tweets: Source[Tweet, NotUsed]
//#tweet-source
// format: ON
= Source(
abstract class TweetSourceDecl {
//#tweet-source
val tweets: Source[Tweet, NotUsed]
//#tweet-source
}
val tweets: Source[Tweet, NotUsed] = Source(
Tweet(Author("rolandkuhn"), System.currentTimeMillis, "#akka rocks!") ::
Tweet(Author("patriknw"), System.currentTimeMillis, "#akka !") ::
Tweet(Author("bantonsson"), System.currentTimeMillis, "#akka !") ::

View file

@ -444,7 +444,7 @@ object PersistentFSMSpec {
reportActor ! ShoppingCardDiscarded
saveStateSnapshot()
}
//#customer-snapshot-example
//#customer-snapshot-example
case Event(GetCurrentCart, data)
stay replying data
case Event(StateTimeout, _)

View file

@ -133,7 +133,7 @@ class TimeoutsSpec extends AkkaSpec {
"BackpressureTimeout" must {
"pass through elements unmodified" in assertAllStagesStopped {
Await.result(Source(1 to 100).backpressureTimeout(1.second).grouped(200).runWith(Sink.head), 3.seconds) should === (1 to 100)
Await.result(Source(1 to 100).backpressureTimeout(1.second).grouped(200).runWith(Sink.head), 3.seconds) should ===(1 to 100)
}
"succeed if subscriber demand arrives" in assertAllStagesStopped {
@ -203,7 +203,7 @@ class TimeoutsSpec extends AkkaSpec {
Thread.sleep(3000)
subscriber.expectError().getMessage should === ("No demand signalled in the last 1 second.")
subscriber.expectError().getMessage should ===("No demand signalled in the last 1 second.")
}
"throw if subscriber never generate demand" in assertAllStagesStopped {
@ -218,7 +218,7 @@ class TimeoutsSpec extends AkkaSpec {
Thread.sleep(3000)
subscriber.expectError().getMessage should === ("No demand signalled in the last 1 second.")
subscriber.expectError().getMessage should ===("No demand signalled in the last 1 second.")
}
"not throw if publisher completes without fulfilling subscriber's demand" in assertAllStagesStopped {