Esempio n. 1
0
        public async Task Can_BlockingDequeueFromList()
        {
            var queue = new Queue <string>();

            storeMembers.ForEach(queue.Enqueue);
            foreach (var x in storeMembers)
            {
                await RedisAsync.EnqueueItemOnListAsync(ListId, x);
            }

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

            Assert.That(item1, Is.EqualTo(queue.Dequeue()));
        }
Esempio n. 2
0
        public async Task BlockingDequeueFromList_Can_TimeOut()
        {
            var item1 = await RedisAsync.BlockingDequeueItemFromListAsync(ListId, TimeSpan.FromSeconds(1));

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