Skip to content
This repository
Browse code

fix broken rename of nanoTimeOfLastSend

  • Loading branch information...
commit f876d921ffccc04eb45daccfc23b7582299733d4 1 parent 27acfcf
Patrik Nordwall authored January 04, 2013
16  akka-remote-tests/src/main/scala/akka/remote/testconductor/Player.scala
@@ -52,12 +52,16 @@ trait Player { this: TestConductorExt ⇒
52 52
     val a = system.actorOf(Props(new Actor {
53 53
       var waiting: ActorRef = _
54 54
       def receive = {
55  
-        case fsm: ActorRef                        ⇒ waiting = sender; fsm ! SubscribeTransitionCallBack(self)
  55
+        case fsm: ActorRef ⇒
  56
+          waiting = sender; fsm ! SubscribeTransitionCallBack(self)
56 57
         case Transition(_, Connecting, AwaitDone) ⇒ // step 1, not there yet
57  
-        case Transition(_, AwaitDone, Connected)  ⇒ waiting ! Done; context stop self
58  
-        case t: Transition[_]                     ⇒ waiting ! Status.Failure(new RuntimeException("unexpected transition: " + t)); context stop self
59  
-        case CurrentState(_, Connected)           ⇒ waiting ! Done; context stop self
60  
-        case _: CurrentState[_]                   ⇒
  58
+        case Transition(_, AwaitDone, Connected) ⇒
  59
+          waiting ! Done; context stop self
  60
+        case t: Transition[_] ⇒
  61
+          waiting ! Status.Failure(new RuntimeException("unexpected transition: " + t)); context stop self
  62
+        case CurrentState(_, Connected) ⇒
  63
+          waiting ! Done; context stop self
  64
+        case _: CurrentState[_] ⇒
61 65
       }
62 66
     }))
63 67
 
@@ -218,7 +222,7 @@ private[akka] class ClientFSM(name: RoleName, controllerAddr: InetSocketAddress)
218 222
           else if (t.rateMBit == 0.0f) Blackhole
219 223
           // Conversion needed as the TokenBucket measures in octets: 125000 Octets/s = 1Mbit/s
220 224
           // FIXME: Initial capacity should be carefully chosen
221  
-          else TokenBucket(capacity = 1000, tokensPerSecond = t.rateMBit * 125000.0, lastSend = 0, availableTokens = 0)
  225
+          else TokenBucket(capacity = 1000, tokensPerSecond = t.rateMBit * 125000.0, nanoTimeOfLastSend = 0, availableTokens = 0)
222 226
 
223 227
           val cmdFuture = TestConductor().transport.managementCommand(SetThrottle(t.target, t.direction, mode))
224 228
 

0 notes on commit f876d92

Please sign in to comment.
Something went wrong with that request. Please try again.