dotnet-installer/test/Microsoft.DotNet.Tools.Tests.Utilities
Piotr Puszkiewicz caad95491a Fix output race (#4911)
* Fix output race

TestCommand starts the test process before wiring up stderr & stdout. This change delays process start until after the wireup is finished so that the test process cannot shut down before we have wired up output redirection.

* Bypass stream forwarder when it fails to attach to a process

CLI has tests failing errenously when, due to timing issues, the StreamForwarders fail to attach to a process because it managed to exit before attachment occurs. 

We tried attaching the forwarders prior to Process Start but this proved impossible because the OUT and ERR streams are not available to attach before the process starts. 

This exposes a fundamental flaw in our output redirection mechanisms. We should probably move to using https://msdn.microsoft.com/en-us/library/system.diagnostics.process.outputdatareceived.aspx or a similar mechanism. However, I don't know that @brthor hadn't considered and discarded this approach.

For the time being I am attempting to make tests more deterministic by capturing the associated exceptions and moving to a different mechanism when StreamForwarders are not available.

Opened https://github.com/dotnet/cli/issues/4913 to track the broader issue.

* File.Copy is not atomic...
2016-12-04 11:54:29 -08:00
..
Assertions Enable overriding MSBuildSDKsPath with env var (#4885) 2016-12-01 14:45:55 -08:00
Commands Fix output race (#4911) 2016-12-04 11:54:29 -08:00
Extensions Invoking a command waits up to 30s for NuGet or another process (#4657) 2016-11-08 23:23:13 -08:00
Mock Fixing broken tests after my changes to the CommandResolvers. 2016-08-25 22:53:04 -07:00
NetworkUtils Increasing timeout to check Kestrel Server is up. 2016-04-08 12:42:43 -07:00
Properties Almost all of the code to prime the NuGet cache from the archive. 2016-06-10 16:53:55 -07:00
TempFileSystem Add test for MSBuild End to End. 2016-07-21 16:02:57 -05:00
DotnetLegacyRuntimeIdentifiers.cs Merging Test.Utilties with the latest code from rel/1.0.0. 2016-10-11 17:20:15 -05:00
Microsoft.DotNet.Tools.Tests.Utilities.csproj Centralize Microsoft.Net.SDK Version (#4890) 2016-12-02 09:34:03 -08:00
NuGetConfig.cs Build-Time Hello World Performance Test (#2681) 2016-04-26 17:52:34 -07:00
PeReaderUtils.cs Fix 32 bit crossgen tests. 2016-05-03 11:35:17 -07:00
ProcessExtensions.cs Add Binding redirects tests 2016-04-25 11:06:13 -07:00
ProjectUtils.cs Address PR Feedback 2016-02-12 16:57:32 -08:00
RepoDirectoriesProvider.cs Add msbuild-based stage0 where possible (#4597) 2016-11-02 23:01:57 -07:00
TestBase.cs [WIP] Removes *3 verbs, making msbuild the driver (#4456) 2016-10-27 18:46:43 -07:00
WindowsOnlyFactAttribute.cs Updating the xunit version to one that does not depend on internalabstractions. 2016-08-10 13:40:13 -07:00