Temporary add delay to connection test to make it pass (#1384)

This commit is contained in:
Pavel Krymets 2017-02-21 16:04:32 -08:00 committed by GitHub
parent 0dca3a266f
commit 80b9673693
1 changed files with 10 additions and 4 deletions

View File

@ -50,12 +50,18 @@ namespace Microsoft.AspNetCore.Server.KestrelTests
mockLibuv.AllocCallback(socket.InternalGetHandle(), 2048, out ignored);
mockLibuv.ReadCallback(socket.InternalGetHandle(), 0, ref ignored);
var readAwaitable = connection.Input.Reader.ReadAsync();
var result = readAwaitable.GetResult();
Assert.False(result.IsCompleted);
}, (object)null);
// Wait until ProcessRequestAsync runs
// TODO: Remove when we get non dispatching support
await Task.Delay(1000);
await context.Thread.PostAsync(_ =>
{
var readAwaitable = connection.Input.Reader.ReadAsync();
Assert.False(readAwaitable.IsCompleted);
}, (object)null);
connection.ConnectionControl.End(ProduceEndType.SocketDisconnect);
}
}