I have a rest api frontend implemented with spray which dispatches commands 
to a backend implemented using akka persistence. I unit tested the rest api 
frontend of this setup successfully using ScalatestRouteTest.

Now, I have separated the backend using cluster sharding, and I have setup 
the rest api frontend to use cluster client for dispatching the commands. 
Again I would like to test the frontend using ScalatestRouteTest while also 
utilizing a multi-jvm setup to integrate the backend cluster. I put 
together my unit test in a manner similar to:

class MySpec extends MultiNodeSpec(MySpecConfig) with STMultiNodeSpec with 
ScalatestRouteTest with MyRouter

However, when I try to compile this, I get the following error:

class MySpec inherits conflicting members:

  value system in class TestKit of type akka.actor.ActorSystem  and

  value system in trait RouteTest of type akka.actor.ActorSystem

(Note: this can be resolved by declaring an override in class MySpec.)

I tried naively overriding system in MySpec but this just leads to other 
errors and doesn’t look right. Has anyone else tried using 
ScalatestRouteTest with multi-jvm? Is there any work around to this 
problem? Or am I approaching this the wrong way? I guess I can easily test 
the cluster separately by sending individual commands, but it would be 
really nice to test them together in an integrated manner, thus confirming 
that the cluster client works fine with the cluster sharding.

Thanks,

Sinan

-- 
>>>>>>>>>>      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 [email protected].
To post to this group, send email to [email protected].
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