コード例 #1
0
        public AkkaProtocolSpec()
            : base(@"akka.test.default-timeout = 1.5 s")
        {
            codec        = new AkkaPduProtobuffCodec(Sys);
            testEnvelope = codec.ConstructMessage(localAkkaAddress, TestActor, testMsg);
            testMsgPdu   = codec.ConstructPayload(testEnvelope);

            testHeartbeat = new InboundPayload(codec.ConstructHeartbeat());
            testPayload   = new InboundPayload(testMsgPdu);
        }
コード例 #2
0
        public AkkaProtocolSpec(ITestOutputHelper helper)
            : base(@"
                    akka.actor.provider = remote
                    akka.test.default-timeout = 1.5 s", helper)
        {
            codec        = new AkkaPduProtobuffCodec(Sys);
            testEnvelope = codec.ConstructMessage(_localAkkaAddress, TestActor, testMsg);
            testMsgPdu   = codec.ConstructPayload(testEnvelope);

            testHeartbeat = new InboundPayload(codec.ConstructHeartbeat());
            testPayload   = new InboundPayload(testMsgPdu);

            config = ConfigurationFactory.ParseString(
                @"akka{
                    remote {

                    transport-failure-detector {
                      implementation-class = ""Akka.Remote.PhiAccrualFailureDetector, Akka.Remote""
                      threshold = 7.0
                      max-sample-size = 100
                      min-std-deviation = 100 ms
                      acceptable-heartbeat-pause = 3 s
                      heartbeat-interval = 1 s
                    }

                    backoff-interval = 1 s

                    require-cookie = off

                    secure-cookie = ""abcde""

                    shutdown-timeout = 5 s

                    startup-timeout = 5 s

                    use-passive-connections = on
                }}").WithFallback(Sys.Settings.Config);
        }