Skip to content

Commit

Permalink
using objects
Browse files Browse the repository at this point in the history
  • Loading branch information
aludwiko committed Dec 17, 2024
1 parent 9bfd656 commit e8de324
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private[impl] final class ConsumerImpl[C <: Consumer](
handleUnexpectedException(message, ex)
}
case IgnoreEffect =>
Future.successful(new SpiConsumer.IgnoreEffect)
Future.successful(SpiConsumer.IgnoreEffect)
case unknown =>
throw new IllegalArgumentException(s"Unknown TimedAction.Effect type ${unknown.getClass}")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private[impl] final class TimedActionImpl[TA <: TimedAction](
private def toSpiEffect(command: Command, effect: TimedAction.Effect): Future[Effect] = {
effect match {
case ReplyEffect(_) => //FIXME remove meta, not used in the reply
Future.successful(new SpiTimedAction.SuccessEffect)
Future.successful(SpiTimedAction.SuccessEffect)
case AsyncEffect(futureEffect) =>
futureEffect
.flatMap { effect => toSpiEffect(command, effect) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class TimedActionImplSpec
new SpiTimedAction.Command("MyMethod", Some(new BytesPayload(ByteString.empty, "")), SpiMetadata.empty))
.futureValue

reply shouldBe an[SpiTimedAction.SuccessEffect]
reply shouldBe an[SpiTimedAction.SuccessEffect.type]
}

"turn thrown command handler exceptions into failure responses" in {
Expand Down

0 comments on commit e8de324

Please sign in to comment.