- transaction.tell(new DeleteData(TestModel.TEST_PATH).toSerializable(), getRef());
-
- expectMsgClass(duration("5 seconds"), ShardTransactionMessages.DeleteDataReply.class);
-
- assertModification(transaction, DeleteModification.class);
-
- //unserialized merge
- transaction.tell(new DeleteData(TestModel.TEST_PATH), getRef());
-
- expectMsgClass(duration("5 seconds"), DeleteDataReply.class);
- }};
- }
-
-
- @Test
- public void testOnReceiveReadyTransaction() throws Exception {
- new JavaTestKit(getSystem()) {{
- final ActorRef shard = createShard();
- final Props props = ShardTransaction.props( store.newReadWriteTransaction(), shard,
- testSchemaContext, datastoreContext, shardStats, "txn",
- DataStoreVersions.CURRENT_VERSION);
- final ActorRef transaction = getSystem().actorOf(props, "testReadyTransaction");
-
- watch(transaction);
-
- transaction.tell(new ReadyTransaction().toSerializable(), getRef());
-
- expectMsgAnyClassOf(duration("5 seconds"), ReadyTransactionReply.SERIALIZABLE_CLASS,
- Terminated.class);
- expectMsgAnyClassOf(duration("5 seconds"), ReadyTransactionReply.SERIALIZABLE_CLASS,
- Terminated.class);
- }};
-
- // test
- new JavaTestKit(getSystem()) {{
- final ActorRef shard = createShard();
- final Props props = ShardTransaction.props( store.newReadWriteTransaction(), shard,
- testSchemaContext, datastoreContext, shardStats, "txn",
- DataStoreVersions.CURRENT_VERSION);
- final ActorRef transaction = getSystem().actorOf(props, "testReadyTransaction2");
-
- watch(transaction);
-
- transaction.tell(new ReadyTransaction(), getRef());
-
- expectMsgAnyClassOf(duration("5 seconds"), ReadyTransactionReply.class,
- Terminated.class);
- expectMsgAnyClassOf(duration("5 seconds"), ReadyTransactionReply.class,
- Terminated.class);
- }};