@Test
public void integrationTest() throws Exception{
+ // System.setProperty("shard.persistent", "true");
// This test will
// - create a Shard
// - initiate a transaction
final ActorSelection transaction =
new ExpectMsg<ActorSelection>("CreateTransactionReply") {
protected ActorSelection match(Object in) {
- if (in instanceof CreateTransactionReply) {
- ActorPath transactionPath =
- ((CreateTransactionReply) in)
- .getTransactionPath();
+ if (CreateTransactionReply.SERIALIZABLE_CLASS.equals(in.getClass())) {
+ CreateTransactionReply reply = CreateTransactionReply.fromSerializable(in);
return getSystem()
- .actorSelection(transactionPath);
+ .actorSelection(reply
+ .getTransactionPath());
} else {
throw noMatch();
}
final ActorRef transactionActorRef = watchActor(transaction);
transaction.tell(new WriteData(TestModel.TEST_PATH,
- ImmutableNodes.containerNode(TestModel.TEST_QNAME)),
+ ImmutableNodes.containerNode(TestModel.TEST_QNAME), TestModel.createTestContext()).toSerializable(),
getRef());
Boolean writeDone = new ExpectMsg<Boolean>("WriteDataReply") {