public async Task OnlyStartOneServer() { ServerData?serverData = null; try { var pipeName = ServerUtil.GetPipeName(); var workingDirectory = TempRoot.CreateDirectory().Path; for (var i = 0; i < 5; i++) { var response = await BuildServerConnection.RunServerBuildRequestAsync( ProtocolUtil.CreateEmptyCSharp(workingDirectory), pipeName, timeoutOverride : Timeout.Infinite, tryCreateServerFunc : (pipeName, logger) => { Assert.Null(serverData); serverData = ServerData.Create(logger, pipeName); return(true); }, Logger, cancellationToken : default); Assert.True(response is CompletedBuildResponse); } } finally { serverData?.Dispose(); } }