Skip to content

Commit

Permalink
Merge branch 'Enji/classcleanup' of https://github.com/microsoft/testfx
Browse files Browse the repository at this point in the history
… into Enji/classcleanup
  • Loading branch information
engyebrahim committed Jul 22, 2024
2 parents 55a8db1 + 43bf218 commit 5d5afa8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ protected override void LogEventsFromTextOutput(string singleLine, MessageImport
}

protected override void ProcessStarted()
=> _connectionLoopTask = Task.Run(() =>
=> _connectionLoopTask = Task.Run(async () =>
{
try
{
Expand All @@ -249,7 +249,7 @@ protected override void ProcessStarted()
pipeServer.RegisterSerializer(new VoidResponseSerializer(), typeof(VoidResponse));
pipeServer.RegisterSerializer(new FailedTestInfoRequestSerializer(), typeof(FailedTestInfoRequest));
pipeServer.RegisterSerializer(new RunSummaryInfoRequestSerializer(), typeof(RunSummaryInfoRequest));
pipeServer.WaitConnectionAsync(_waitForConnections.Token).GetAwaiter().GetResult();
await pipeServer.WaitConnectionAsync(_waitForConnections.Token);
_connections.Add(pipeServer);
Log.LogMessage(MessageImportance.Low, $"Client connected to '{_pipeNameDescription.Name}'");
}
Expand All @@ -258,6 +258,10 @@ protected override void ProcessStarted()
{
// Do nothing we're cancelling
}
catch (Exception ex)
{
Log.LogError(ex.ToString());
}
});

public override bool Execute()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public NamedPipeServer(
CancellationToken cancellationToken)
{
ArgumentGuard.IsNotNull(pipeNameDescription);
_namedPipeServerStream = new((PipeName = pipeNameDescription).Name, PipeDirection.InOut, maxNumberOfServerInstances);
_namedPipeServerStream = new((PipeName = pipeNameDescription).Name, PipeDirection.InOut, maxNumberOfServerInstances, PipeTransmissionMode.Byte, PipeOptions.Asynchronous);
_callback = callback;
_environment = environment;
_logger = logger;
Expand Down

0 comments on commit 5d5afa8

Please sign in to comment.