Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hangdump running into crashdump #4378

Merged
merged 12 commits into from
Apr 24, 2023
Prev Previous commit
Next Next commit
Fix
  • Loading branch information
nohwnd committed Apr 20, 2023
commit 78d856b30da58c3a4c147d7c3a8752e74bfa38e2

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public void CrashDumpOnStackOverflow(RunnerInfo runnerInfo)
var assemblyPaths = GetAssetFullPath("crash.dll");
var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, string.Empty, runnerInfo.InIsolationValue);
arguments = string.Concat(arguments, $" /ResultsDirectory:{TempDirectory.Path}");
arguments = string.Concat(arguments, $@" /Blame:""CollectHangDump;TestTimeout=10s;CollectDump;DumpType=full"" /diag:S:\t\logs\l1\");
arguments = string.Concat(arguments, $@" /Blame:""CollectHangDump;TestTimeout=15s;CollectDump;DumpType=full"" /diag:S:\t\logs\l1\");

var env = new Dictionary<string, string?>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.IO;

using Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.Interfaces;
Expand Down Expand Up @@ -63,7 +62,7 @@ public void GetDumpFileWillThrowExceptionIfNoDumpfile()

processDumpUtility.StartTriggerBasedProcessDump(processId, testResultsDirectory, false, ".NETCoreApp,Version=v5.0", false, _ => { });

var ex = Assert.ThrowsException<FileNotFoundException>(() => processDumpUtility.GetDumpFiles(true, false, DateTime.Now));
var ex = Assert.ThrowsException<FileNotFoundException>(() => processDumpUtility.GetDumpFiles(true, false));
Assert.AreEqual(ex.Message, Resources.Resources.DumpFileNotGeneratedErrorMessage);
}
}