Test: race condition in checking remote stream.

This commit is contained in:
xinchen 2020-06-17 10:49:26 -07:00
Родитель 72b1986958
Коммит 3ce9ef7a15
1 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -978,7 +978,11 @@ namespace Test.Amqp
Assert.IsTrue(transport != null, "transport is null");
try
{
transport.WriteByte(1);
for (int i = 0; i < 5; i++)
{
transport.WriteByte(1);
Thread.Sleep(100);
}
Assert.IsTrue(false, "transport not disposed 1.");
}
catch (ObjectDisposedException) { }
@ -997,7 +1001,11 @@ namespace Test.Amqp
Assert.IsTrue(transport != null, "transport is null 2");
try
{
transport.WriteByte(2);
for (int i = 0; i < 5; i++)
{
transport.WriteByte(2);
Thread.Sleep(100);
}
Assert.IsTrue(false, "transport not disposed 2.");
}
catch (ObjectDisposedException) { }