Exemplo n.º 1
0
        public async Task Should_batch_writes()
        {
            var log = A.Fake <ILogger>();

            var longDelay = new CounterCollector <string>(store, log, 100, 10, 10000);

            for (var i = 0; i < 100; i++)
            {
                var key = i.ToString(CultureInfo.InvariantCulture);

                await longDelay.AddAsync(key, new CounterMap());
            }

            await longDelay.DisposeAsync();

            A.CallTo(() => store.BatchWriteAsync(A <List <(string, CounterMap)> > .That.Matches(x => x.Count == 10), default))
Exemplo n.º 2
0
 public void Dispose()
 {
     collector.DisposeAsync().AsTask().Wait();
 }