Esempio n. 1
0
        public async Task EchoTaskGrain_Await_Reentrant()
        {
            IReentrantBlockingEchoTaskGrain g = GrainClient.GrainFactory.GetGrain <IReentrantBlockingEchoTaskGrain>(GetRandomGrainId());

            string received = await g.Echo(expectedEcho);

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

            received = await g.CallMethodAV_Await(expectedEcho);

            Assert.AreEqual(expectedEcho, received, "CallMethodAV_Await");

            received = await g.CallMethodTask_Await(expectedEcho);

            Assert.AreEqual(expectedEcho, received, "CallMethodTask_Await");
        }
Esempio n. 2
0
        public async Task EchoTaskGrain_Await_Reentrant()
        {
            IReentrantBlockingEchoTaskGrain g = this.GrainFactory.GetGrain <IReentrantBlockingEchoTaskGrain>(GetRandomGrainId());

            string received = await g.Echo(expectedEcho);

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

            received = await g.CallMethodAV_Await(expectedEcho);

            Assert.Equal(expectedEcho, received); // CallMethodAV_Await

            received = await g.CallMethodTask_Await(expectedEcho);

            Assert.Equal(expectedEcho, received); // CallMethodTask_Await
        }