Beispiel #1
0
        public async Task MessagesCanBeHandledConcurrentlyAsync()
        {
            const int count = 10;
            var       tasks = Enumerable
                              .Range(0, count)
                              .Select(i =>
            {
                var messageNumber = i + 1;
                var message       = GenerateMessage();
                var detail        = "Concurrent message (" + messageNumber + " of " + count + ")";
                var @event        = GenerateDiagnosticEvent(this, TestExecuted, message, detail);

                return(GelfLoggingSink.ConsumeAsync(@event));
            });

            await Task.WhenAll(tasks);
        }
Beispiel #2
0
 protected Task WhenConsumingEvent()
 {
     return(GelfLoggingSink.ConsumeAsync(Event));
 }