Esempio n. 1
0
        public async Task Can_BlockingPopFromList()
        {
            var stack = new Stack <string>();

            storeMembers.ForEach(stack.Push);
            foreach (var x in storeMembers)
            {
                await RedisAsync.PushItemToListAsync(ListId, x);
            }

            var item1 = await RedisAsync.BlockingPopItemFromListAsync(ListId, null);

            Assert.That(item1, Is.EqualTo(stack.Pop()));
        }
Esempio n. 2
0
        public async Task BlockingPopFromList_Can_TimeOut()
        {
            var item1 = await RedisAsync.BlockingPopItemFromListAsync(ListId, TimeSpan.FromSeconds(1));

            Assert.That(item1, Is.Null);
        }