Test troubleshooting

This commit is contained in:
Christian Köllner 2019-08-23 23:35:22 +02:00
parent 828503e919
commit ee974940c0
2 changed files with 13 additions and 2 deletions

View File

@ -446,6 +446,7 @@ namespace Capnp.Net.Runtime.Tests
Assert.IsTrue(resolving.WhenResolved.Wait(MediumNonDbgTimeout)); Assert.IsTrue(resolving.WhenResolved.Wait(MediumNonDbgTimeout));
var cap = new TestCallOrderImpl(); var cap = new TestCallOrderImpl();
cap.CountToDispose = 6;
var earlyCall = main.GetCallSequence(0, default); var earlyCall = main.GetCallSequence(0, default);

View File

@ -191,6 +191,8 @@ namespace Capnp.Rpc
} }
} }
try
{
try try
{ {
if (!_acceptorThread.Join(500)) if (!_acceptorThread.Join(500))
@ -199,6 +201,14 @@ namespace Capnp.Rpc
} }
} }
catch (ThreadStateException) catch (ThreadStateException)
{
}
catch (System.Exception exception)
{
Logger.LogError($"Unable to join TCP acceptor thread: {exception.Message}");
}
}
catch (ThreadStateException)
{ {
// If acceptor thread was not yet started this is not a problem. Ignore. // If acceptor thread was not yet started this is not a problem. Ignore.
} }