Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.1: fix sometimes-off-by-one in PeekMailbox, see #2851 #975

Merged
merged 1 commit into from Dec 21, 2012

Conversation

rkuhn
Copy link
Contributor

@rkuhn rkuhn commented Dec 20, 2012

No description provided.

@akka-ci
Copy link

akka-ci commented Dec 20, 2012

Started jenkins job akka-pr-validator at https://jenkins.akka.io/job/akka-pr-validator/249/

@akka-ci
Copy link

akka-ci commented Dec 20, 2012

jenkins job akka-pr-validator: Success - https://jenkins.akka.io/job/akka-pr-validator/249/

@@ -40,15 +40,15 @@ class PeekMailboxExtension(val system: ExtendedActorSystem) extends Extension {
class PeekMailboxType(settings: ActorSystem.Settings, config: Config) extends MailboxType {
override def create(owner: Option[ActorRef], system: Option[ActorSystem]) = (owner, system) match {
case (Some(o), Some(s)) ⇒
val tries = config.getInt("max-tries") ensuring (_ >= 1, "max-tries must be at least 1")
val mailbox = new PeekMailbox(o, s, tries)
val retries = config.getInt("max-retries") ensuring (_ >= 1, "max-retries must be at least 1")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we normally use ConfigExceptions for this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, or IllegalArgumentException (possibly via requires)
ensuring throws assertion error, which was the reason for https://www.assembla.com/spaces/akka/simple_planner#/ticket:2798

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, yes, of course, my bad; will fix

@viktorklang
Copy link
Member

Aside from comment: LGTM!

@patriknw
Copy link
Member

LGTM

rkuhn added a commit that referenced this pull request Dec 21, 2012
2.1: fix sometimes-off-by-one in PeekMailbox, see #2851
@rkuhn rkuhn merged commit 58bc74b into release-2.1 Dec 21, 2012
@rkuhn rkuhn deleted the wip-2.1-2851-PeekMailbox-∂π branch December 21, 2012 09:47
@bantonsson
Copy link
Member

👍 After the fact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants