fix tests

This commit is contained in:
Nicolas Constant 2021-02-14 20:09:01 -05:00
parent 5781af6b3b
commit be9bf5ebc5
No known key found for this signature in database
GPG key ID: 1E9F677FB01A5688

View file

@ -143,8 +143,13 @@ namespace BirdsiteLive.Pipeline.Tests.Processors
var processor = new RetrieveTwitterUsersProcessor(twitterUserDalMock.Object, maxUsersNumberProviderMock.Object, loggerMock.Object);
processor.WaitFactor = 2;
var t = processor.GetTwitterUsersAsync(buffer, CancellationToken.None);
var t2 = Task.Run(async () =>
{
while (buffer.Count < 11)
await Task.Delay(50);
});
await Task.WhenAny(t, Task.Delay(400));
await Task.WhenAny(t, t2, Task.Delay(2000));
#region Validations
maxUsersNumberProviderMock.VerifyAll();