>
>  def run: Unit = LogReaderDisruptor.main(Array())
> is a method that is supposed to run forever, plus it required some setup
> (that is available on client's machine or test environment),
>
By that do you mean that the main() is never returning? If so, then you're
blocking the Actor and wasting an entire thread.
Spawn this off on a dedicated dispatcher instead (see dispatchers and
futures docs).


> it was not trivial to set it up for Unit Test, which is why I mocked that
> part out
>
The overall technique is very good, I'm just reserved on using mocking
tools with concurrent code AFAIR this yields suprising results sometimes.

How would you recommend such a method otherwise?
>
Extract an interface (trait) and in tests provide a NoopImplementation
instance of it.

-- Konrad

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to