Re: How to write test cases for the functionalities which involves actor communication
Good, thank you very much Patrick Best, -- Nan Zhu On Sunday, February 9, 2014 at 1:23 PM, Patrick Wendell wrote: > It's possible to mock out actors... we have a few examples in the code > base. One his here: > > https://github.com/apache/incubator-spark/blob/master/core/src/test/scala/org/apache/spark/deploy/worker/WorkerWatcherSuite.scala > > On Sun, Feb 9, 2014 at 6:21 AM, Nan Zhu (mailto:zhunanmcg...@gmail.com)> wrote: > > Hi, all > > > > I have a question when trying to write some test cases for the PR > > > > The key functionality in my PR involves actor communication between master > > and worker, like the worker does something and returns the result to the > > master via a message, I want to test if the master can do the right thing > > according to the number of workers existing in the cluster and the return > > result from the worker, > > > > Is there any way to test this via some test cases? > > > > Thank you > > > > Best, > > > > -- > > Nan Zhu > > > > >
Re: How to write test cases for the functionalities which involves actor communication
It's possible to mock out actors... we have a few examples in the code base. One his here: https://github.com/apache/incubator-spark/blob/master/core/src/test/scala/org/apache/spark/deploy/worker/WorkerWatcherSuite.scala On Sun, Feb 9, 2014 at 6:21 AM, Nan Zhu wrote: > Hi, all > > I have a question when trying to write some test cases for the PR > > The key functionality in my PR involves actor communication between master > and worker, like the worker does something and returns the result to the > master via a message, I want to test if the master can do the right thing > according to the number of workers existing in the cluster and the return > result from the worker, > > Is there any way to test this via some test cases? > > Thank you > > Best, > > -- > Nan Zhu >
How to write test cases for the functionalities which involves actor communication
Hi, all I have a question when trying to write some test cases for the PR The key functionality in my PR involves actor communication between master and worker, like the worker does something and returns the result to the master via a message, I want to test if the master can do the right thing according to the number of workers existing in the cluster and the return result from the worker, Is there any way to test this via some test cases? Thank you Best, -- Nan Zhu