//
        // ScatterGatherFirstCompletedPool
        //
        private byte[] ScatterGatherFirstCompletedPoolToProto(ScatterGatherFirstCompletedPool scatterGatherFirstCompletedPool)
        {
            var message = new Proto.Msg.ScatterGatherPool();

            message.Generic = GenericRoutingPoolBuilder(scatterGatherFirstCompletedPool);
            message.Within  = Google.Protobuf.WellKnownTypes.Duration.FromTimeSpan(scatterGatherFirstCompletedPool.Within);
            return(message.ToByteArray());
        }
        public void CanSerializeScatterGatherFirstCompletedPool()
        {
            var decider = Decider.From(
             Directive.Restart,
             Directive.Stop.When<ArgumentException>(),
             Directive.Stop.When<NullReferenceException>());

            var supervisor = new OneForOneStrategy(decider);

            var message = new ScatterGatherFirstCompletedPool(10, null, supervisor, "abc", TimeSpan.MaxValue);
            AssertEqual(message);
        }
Example #3
0
        public void Can_serialize_ScatterGatherFirstCompletedPool()
        {
            var message = new ScatterGatherFirstCompletedPool(nrOfInstances: 25, within: 3.Seconds());

            AssertEqual(message);
        }
Example #4
0
        public void CanSerializeScatterGatherFirstCompletedPool()
        {
            var message = new ScatterGatherFirstCompletedPool(10);

            AssertEqual(message);
        }