Remove StreamForwarder from CLI tests (#4936)
* WiP * Replace StreamForwarder with OutputDataReceived * Add build logging around test execution * add newlines * Add handling for the null terminator while maintaining empty lines * Extra Diag * Verbose logging for VS Test Console * Fix asset file locking tests * Add testcommand timeout + improve dotnet-new tests * WiP * Welcome, JoSequ! * Fix failing tests * Clean out diagnostics writelines * self-PR1
This commit is contained in:
parent
2b7e9b6524
commit
2fbafe6f3f
21 changed files with 353 additions and 753 deletions
|
@ -21,17 +21,23 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
|
||||
public FileInfoNuGetLock(FileInfo fileInfo)
|
||||
{
|
||||
var taskCompletionSource = new TaskCompletionSource<string>();
|
||||
|
||||
_cancellationTokenSource = new CancellationTokenSource();
|
||||
|
||||
_task = ConcurrencyUtilities.ExecuteWithFileLockedAsync<int>(
|
||||
_task = Task.Run(async () => await ConcurrencyUtilities.ExecuteWithFileLockedAsync<int>(
|
||||
fileInfo.FullName,
|
||||
lockedToken =>
|
||||
cancellationToken =>
|
||||
{
|
||||
Task.Delay(60000, _cancellationTokenSource.Token).Wait();
|
||||
taskCompletionSource.SetResult("Lock is taken so test can continue");
|
||||
|
||||
Task.Delay(60000, cancellationToken).Wait();
|
||||
|
||||
return Task.FromResult(0);
|
||||
},
|
||||
_cancellationTokenSource.Token);
|
||||
_cancellationTokenSource.Token));
|
||||
|
||||
taskCompletionSource.Task.Wait();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue