Making the reporing channel port discovery and accept incoming connections separate. Before we were hanging when creating the reporting channel and never starting the test runner.

This commit is contained in:
Livar Cunha 2016-02-24 16:53:16 -08:00
parent 252eb4371f
commit 3f2b1d068d
7 changed files with 61 additions and 20 deletions

View file

@ -148,6 +148,16 @@ namespace Microsoft.Dotnet.Tools.Test.Tests
_reportingChannelFactoryMock.Verify(r => r.CreateChannelWithAnyAvailablePort(), Times.Once);
}
[Fact]
public void It_calls_accept_on_the_test_runner_channel()
{
_testGetTestRunnerProcessStartInfoMessageHandler.HandleMessage(
_dotnetTestMock.Object,
_validMessage);
_testRunnerChannelMock.Verify(t => t.Accept(), Times.Once);
}
[Fact]
public void It_makes_dotnet_test_listen_on_the_test_runner_port_for_messages_when_it_handles_the_message()
{