static void Main(string[] args) { try { Console.Title = "Redis Streams Showcase"; Redis = Common.Redis.InitializeConnection(ConfigurationManager.AppSettings["Redis.Password"]); Console.WriteLine("Pick one:"); Console.WriteLine(" 1 - Write into and read values from a stream"); Console.WriteLine(" 2 - Consumer groups: Producer"); Console.WriteLine(" 3 - Consumer groups: Consumer"); Console.WriteLine(); Console.Write("> "); while (true) { var c = Console.ReadKey(true).KeyChar; Console.WriteLine(c); switch (c) { case '1': TestStreams.Execute(Redis); return; case '2': TestConsumerGroups.Execute(Redis, string.Empty); return; case '3': TestConsumerGroups.Execute(Redis, EnterConsumerGroup()); return; default: break; } } } catch (Exception e) { Tools.PrintExceptionDetails(e); Console.Write("<ENTER> "); Console.ReadLine(); } }
static IEnumerable <object[]> GetTestStreams() => TestStreams.Select(s => new object[] { s });
public void GivenAStreamWithSingleErrorAndBackOff() { Sut = TestStreams.HasOneError().BackOff(Schedulers); TimeAdvances(); }
public void GivenAStreamThatWillYieldASingleError() { Sut = TestStreams.HasOneError(); TimeAdvances(); }
public void GivenAStreamWithMoreErrorsThanTheBackOffAllows() { Sut = TestStreams.ErrorsUntil(10000).BackOff(Schedulers, 9999); TimeAdvances(); }
public void GivenAStreamWithLotsOfErrorsAndBackOff() { Sut = TestStreams.ErrorsUntil(10000).BackOff(Schedulers, 10001); TimeAdvances(); }