Skip to content

Commit

Permalink
Fixed test (renamed Meter.exceptionMarkerPartialFunction to Meter.exc…
Browse files Browse the repository at this point in the history
…eptionMarkerPF to bring it in line with Timer.timePF).
  • Loading branch information
Erik van Oosten committed Aug 6, 2013
1 parent 50a914b commit 110ce4a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/main/scala/nl/grons/metrics/scala/Meter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class Meter(private val metric: CHMeter) {
}

@deprecated("please use exceptionMarkerPF", "3.0.2")
@inline
def exceptionMarkerPartialFunction = exceptionMarkerPF

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ trait ReceiveExceptionMeterActor extends Actor { self: InstrumentedBuilder =>
def receiveExceptionMeterName: String = MetricBuilder.metricName(getClass, Seq("receiveExceptionMeter"))
lazy val meter: Meter = metrics.meter(receiveExceptionMeterName)

private[this] lazy val wrapped = meter.exceptionMarkerPartialFunction(super.receive)
private[this] lazy val wrapped = meter.exceptionMarkerPF(super.receive)

abstract override def receive = wrapped

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ object TestFixture {
class ExceptionMeterTestActor(fixture: Fixture) extends ExceptionThrowingTestActor(fixture) with ReceiveExceptionMeterActor

class ComposedActor(fixture: Fixture) extends TestActor(fixture)
with ReceiveCounterActor with ReceiveTimerActor with ReceiveExceptionMeterActor
with ReceiveCounterActor with ReceiveTimerActor with ReceiveExceptionMeterActor

}

Expand Down Expand Up @@ -122,7 +122,7 @@ class ActorMetricsSpec extends FunSpec with ShouldMatchers {
val fixture = new Fixture
val ref = TestActorRef(new ExceptionMeterTestActor(fixture))
intercept[RuntimeException] { ref.receive("test") }
verify(fixture.mockMeter).exceptionMarkerPartialFunction
verify(fixture.mockMeter).exceptionMarkerPF
}
}

Expand Down

0 comments on commit 110ce4a

Please sign in to comment.