@Test public void testGetSnapshotFailureReply() { TestKit kit = new TestKit(getSystem()); ActorRef replyActor = getSystem().actorOf(ShardManagerGetSnapshotReplyActor.props( Arrays.asList("shard1", "shard2"), "config", null, kit.getRef(), "shard-manager", FiniteDuration.create(100, TimeUnit.SECONDS)), "testGetSnapshotFailureReply"); kit.watch(replyActor); replyActor.tell(new GetSnapshotReply(ShardIdentifier.create("shard1", MEMBER_1, "config").toString(), Snapshot.create(ByteState.of(new byte[]{1,2,3}), Collections.<ReplicatedLogEntry>emptyList(), 2, 1, 2, 1, 1, "member-1", null)), ActorRef.noSender()); replyActor.tell(new Failure(new RuntimeException()), ActorRef.noSender()); kit.expectMsgClass(Failure.class); kit.expectTerminated(replyActor); }
public static Props props(final Collection<String> shardNames, final String datastoreType, final ShardManagerSnapshot shardManagerSnapshot, final ActorRef replyToActor, final String id, final FiniteDuration receiveTimeout) { return Props.create(ShardManagerGetSnapshotReplyActor.class, new Params(shardNames, datastoreType, shardManagerSnapshot, replyToActor, id, receiveTimeout)); }
ShardManagerGetSnapshotReplyActor extends UntypedAbstractActor { public static Props props(final Collection<String> shardNames, final String datastoreType, final ShardManagerSnapshot shardManagerSnapshot, final ActorRef replyToActor, final String id, final FiniteDuration receiveTimeout) { return Props.create(ShardManagerGetSnapshotReplyActor.class, new Params(shardNames, datastoreType, shardManagerSnapshot, replyToActor, id, receiveTimeout)); } }
ShardManagerGetSnapshotReplyActor extends UntypedAbstractActor { public static Props props(final Collection<String> shardNames, final String datastoreType, final ShardManagerSnapshot shardManagerSnapshot, final ActorRef replyToActor, final String id, final FiniteDuration receiveTimeout) { return Props.create(ShardManagerGetSnapshotReplyActor.class, new Params(shardNames, datastoreType, shardManagerSnapshot, replyToActor, id, receiveTimeout)); } private  ShardManagerGetSnapshotReplyActor(final Params params); }
ShardManagerGetSnapshotReplyActor extends UntypedAbstractActor { public static Props props(final Collection<String> shardNames, final String datastoreType, final ShardManagerSnapshot shardManagerSnapshot, final ActorRef replyToActor, final String id, final FiniteDuration receiveTimeout) { return Props.create(ShardManagerGetSnapshotReplyActor.class, new Params(shardNames, datastoreType, shardManagerSnapshot, replyToActor, id, receiveTimeout)); } private  ShardManagerGetSnapshotReplyActor(final Params params); @Override void onReceive(final Object message); static Props props(final Collection<String> shardNames, final String datastoreType,
            final ShardManagerSnapshot shardManagerSnapshot, final ActorRef replyToActor, final String id,
            final FiniteDuration receiveTimeout); }
ShardManagerGetSnapshotReplyActor extends UntypedAbstractActor { public static Props props(final Collection<String> shardNames, final String datastoreType, final ShardManagerSnapshot shardManagerSnapshot, final ActorRef replyToActor, final String id, final FiniteDuration receiveTimeout) { return Props.create(ShardManagerGetSnapshotReplyActor.class, new Params(shardNames, datastoreType, shardManagerSnapshot, replyToActor, id, receiveTimeout)); } private  ShardManagerGetSnapshotReplyActor(final Params params); @Override void onReceive(final Object message); static Props props(final Collection<String> shardNames, final String datastoreType,
            final ShardManagerSnapshot shardManagerSnapshot, final ActorRef replyToActor, final String id,
            final FiniteDuration receiveTimeout);  }