Пример #1
0
        public async Task EchoGrain_LastEcho()
        {
            Stopwatch clock = new Stopwatch();

            await EchoGrain_Echo();

            clock.Start();
            string received = await grain.GetLastEchoAsync();

            logger.Info("EchoGrain.LastEcho took " + clock.Elapsed);

            Assert.AreEqual(expectedEcho, received, "LastEcho-Echo");

            EchoGrain_EchoError();

            clock.Restart();
            received = await grain.GetLastEchoAsync();

            logger.Info("EchoGrain.LastEcho-Error took " + clock.Elapsed);

            Assert.AreEqual(expectedEchoError, received, "LastEcho-Error");
        }
Пример #2
0
        public async Task EchoGrain_LastEcho()
        {
            Stopwatch clock = new Stopwatch();

            await EchoGrain_Echo();

            clock.Start();
            string received = await grain.GetLastEchoAsync();

            this.Logger.LogInformation("EchoGrain.LastEcho took {Elapsed}", clock.Elapsed);

            Assert.Equal(expectedEcho, received); // LastEcho-Echo

            await EchoGrain_EchoError();

            clock.Restart();
            received = await grain.GetLastEchoAsync();

            this.Logger.LogInformation("EchoGrain.LastEcho-Error took {Elapsed}", clock.Elapsed);

            Assert.Equal(expectedEchoError, received); // LastEcho-Error
        }