Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 10:12
    cptjazz synchronize #4242
  • Feb 22 12:02
    cptjazz opened #4242
  • Feb 21 19:37
    Arkatufus synchronize #4228
  • Feb 21 19:37
    Arkatufus ready_for_review #4228
  • Feb 21 15:42
    Aaronontheweb assigned #4241
  • Feb 21 15:42
    Aaronontheweb milestoned #4241
  • Feb 21 15:42
    Aaronontheweb labeled #4241
  • Feb 21 15:42
    Aaronontheweb labeled #4241
  • Feb 21 15:42
    Aaronontheweb labeled #4241
  • Feb 21 15:42
    Aaronontheweb opened #4241
  • Feb 21 01:47
    Arkatufus opened #4240
  • Feb 21 00:10
    Aaronontheweb synchronize #4212
  • Feb 20 23:50
    Aaronontheweb synchronize #4238
  • Feb 20 23:48
    Aaronontheweb commented #4234
  • Feb 20 23:47
    Aaronontheweb synchronize #4212
  • Feb 20 23:46

    Aaronontheweb on dev

    close #4234 - added CachingConf… (compare)

  • Feb 20 23:46
    Aaronontheweb closed #4239
  • Feb 20 23:46
    Aaronontheweb closed #4234
  • Feb 20 23:25
    Aaronontheweb synchronize #4239
  • Feb 20 23:24
    Aaronontheweb opened #4239
Aaron Stannard
@Aaronontheweb
or the akkadotnet user's
so anyone can submit a PR to the master branch with a new release, and as long as it gets reviewed by a core team member with merge rights
it will be automatically deployed upon merge
Vagif Abilov
@object
Oh I see. Then I can take it further.
Finn Newick
@finnnewick-justgiving

Hi there

I'm trying to write a test to verify that one actor takes a list of values and sends a message per distinct value.

Any hints about the best way to do this? E.g. Is there a way to find out the counts of messages received by a TestProbe actor?

Marc Piechura
@marcpiechura
@finnnewick-justgiving you could use ReceiveN or if your list is small and contains the same type ExpectMsg(1,2,3)
Finn Neuik
@finnneuik_twitter
that won't tell me if I've got any extra messages queued though presumably?
e.g. if ExpectMessage(1,2) was passing I'd like ExpectMessage(1,2,3) to fail
same goes for ReceiveN if I understand correctly?
Marc Piechura
@marcpiechura
That's true, you could use ExpectNoMsg to verify that you doesn't receive any further messages
There is also a ReceiveWhile which you can use to collect all messages in a given time period and then check that the list only contains the ones you expect
Finn Neuik
@finnneuik_twitter
ok, I guess that would work - I guess the timeout can be reduced dramatically from the default of 3s?
thanks for the help - using akka.net for the first time this week
Marc Piechura
@marcpiechura
Yep you can reduce it, normally via parameter but afaik there is also a more general way, something like Within(()=> ..., Timeout) where all assertions inside the within block use the provided timeout instead of 3s
Cool, have you already seen the bootcamp?
Finn Neuik
@finnneuik_twitter
yep, although was planning to go through the pluralsight courses first
Marc Piechura
@marcpiechura
👍
Aaron Stannard
@Aaronontheweb
@finnneuik_twitter imho, just do the bootcamp
the pluralsight courses are a little off
based on some feedback I've gotten from folks who took them and did my advance training
your mileage may vary though
artem-karnaukh
@artem-karnaukh
hey im trying to dip into akka.cluster sharding and get the following error when trying to send a message to a shard actor: 2016-05-31 22:26:35.0691|WARN|Akka.Cluster.Sharding.ShardRegion|Trying to register to coordinator at [user/sharding/UserCoordinator/singleton/coordinator], but no acknowledgement. Total [3] buffered messages.
is there any quick fix for it?
Sean Gilliam
@sean-gilliam

@sean-gilliam I found this while working on Cluster stuff tonight and thought you'd get a laugh

@Aaronontheweb lol. GhostDoc is the bane of my existence.

Aaron Stannard
@Aaronontheweb
ping @Horusiath about that @artem-karnaukh
Arjen Smits
@Danthar
sqlserver persistence 1.0.8 has just been pushed, should be available on nuget shortly
Aaron Stannard
@Aaronontheweb
@Danthar :+1: ty sir - that should solve the issue for you @object
Aaron Stannard
@Aaronontheweb
@/all any strong opinions on using or not using System.Diagnostics.Contracts in all Akka libraries going forward?
been going through some core Akka stuff today and saw that we have at least 3 different ways of doing Debug assertions now
some custom exceptions, Debug.Assert
I'm in favor of just standardizing all of this on Code Contracts
the tooling for it is great
among other things
qwoz
@qwoz
Any trick to sending email from within an actor? I'm using SMTPClient and I'm temporarily abusing NUnit a little to actually send out emails for real from within my actor as part of the test as a quick way of verifying the contents are what I expect (I'll fake the email send later). The problem is that I get an SMTPException with an inner exception of ThreadAbortedException.
Aaron Stannard
@Aaronontheweb
@qwoz the ThreadAbortedException usually comes from the test runner
when cleaning up the actors
when I've had to do this stuff before I just had an actor who would queue "email messages" out onto a queue
that would get scooped up by another process and delivered in batch
but that was kind of a special case with how I had to deliver them
(wasn't really over email - just a similar notification system)
what I would do in your case
is create a wrapper around the SMTPClient
can be a thin one
and then unit test with a mock / fake version of that wrapper class
that way you're not live-firing emails during testing
qwoz
@qwoz

hm... I'm using SmallestMailboxPool over the actor that sends out emails to have a bunch available. That actor simply does:

Receive<Email>(email => // SMTPClient stuff here );

so I'd think it wouldn't actually finish and clean up the actor prior to that call completing.

Aaron Stannard
@Aaronontheweb
is the SMTP connection persistent?
or is it something you need to open / close per-request
qwoz
@qwoz
not persistent... it connects to the server for each email send.