-
Notifications
You must be signed in to change notification settings - Fork 636
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
stabilize tests and update libg #15736
Conversation
UI Smoke TestsTest: success. 11 passed, 0 failed. |
var firstASMmodulePath = string.Empty; | ||
foreach (string module in assemblies) | ||
var firstASMmodulePath = string.Empty; | ||
foreach (ProcessModule module in dynamoCLI.Modules) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these are IDisposable.
var firstASMmodulePath = string.Empty; | ||
foreach (ProcessModule module in dynamoCLI.Modules) | ||
{ | ||
if (module.ModuleName.IndexOf("Analytics.dll", StringComparison.OrdinalIgnoreCase) != -1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are all of these modules managed modules? Will this property return both managed and unmanaged?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both, managed and unmanaged
Process[] procs = Process.GetProcessesByName("excel"); | ||
foreach (Process proc in procs) | ||
proc.Kill(); | ||
foreach (var process in Process.GetProcessesByName("EXCEL")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it better to use your new method for this, or that requires having the windows instance of excel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, we don't have the handle here. We do however identify the process by the title.
if (DynamoModel.IsTestMode && !string.IsNullOrEmpty(CreationProperties?.UserDataFolder)) | ||
{ | ||
var newPath = Path.Combine(Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName, "Webview2Data", $"{Environment.ProcessId}", tag); | ||
if (Directory.Exists(newPath)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean if directory does not exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this part. Will try it out in another PR
@@ -131,7 +131,6 @@ void WindowClosed(object sender, EventArgs e) | |||
|
|||
ss.Closed -= WindowClosed; | |||
|
|||
Assert.IsNull(ss.webView);// Make sure webview2 was disposed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found that waiting for the ss.webView object to be disposed is not reliable and not critical for this test.
This is an intentional change
proc.Kill(); | ||
foreach (var process in Process.GetProcessesByName("EXCEL")) | ||
{ | ||
if (process.MainWindowTitle.Equals("ImportExport_Data To Excel - Excel")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What process is it that does not have this title? IOW, what other titles are there? Is this title specific to Dynamo or the tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The titles are specific to each dyn. If a test runs a dyn that reads/writes an excel file name "test1", then the excel window will have the title "test1 - Excel". This title is set by the excel interop API (AFAIK)
Service.ShutDown(); | ||
{ | ||
// Lock shutdown sequence in case other tracking calls might be executing concurently. | ||
lock(trackEventLockObj) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so I might be wrong - but in all other cases this lock is held from a worker thread on the thread pool, not from main thread... could this cause a dead lock?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I could tell from the logs Looks like there is concurrent access to an analytics resource (a dictionary). The dictionary is changed while it is iterated over in another thread. The Shutdown call is the only one that is not thread safe
@@ -105,7 +105,7 @@ public static bool ExcelProcessRunning | |||
{ | |||
get | |||
{ | |||
return Process.GetProcessesByName("EXCEL").Length != 0; | |||
return GetExcelProcess(_app) != null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you briefly explain these changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With my change we can check if the Excel process that is associated with the COM object "_app" is alive.
Previously we were checking if any process called "EXCEL" was running. It seemed that could get into situations where multiple Excel processes could get mixed up
@@ -139,18 +138,10 @@ | |||
<ItemGroup> | |||
<Folder Include="NodesJsonDatasets\" /> | |||
</ItemGroup> | |||
<Target Name="CopyDisableADPTestDeps"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
@@ -154,10 +154,10 @@ protected void OpenModelInManualMode(string relativeFilePath) | |||
CurrentDynamoModel.ExecuteCommand(new DynamoModel.OpenFileCommand(openPath, true)); | |||
} | |||
|
|||
protected void OpenSampleModel(string relativeFilePath) | |||
protected void OpenSampleModel(string relativeFilePath, bool forceManualExecution = false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually think this is a binary API break for clients who derive from this class for their tests, which is public, I think you need to add a new overload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, it would break ABI compatibility. Nice catch!
//Todo Ritesh: Locally passing but failing on CI. | ||
//After fixing issue with this test case add Smoke Test Category. | ||
//Todo Ritesh: Locally passing but failing on CI. | ||
//After fixing issue with this test case add Smoke Test Category. | ||
public void ImportExport_Excel_to_Dynamo() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this pass now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fails on the master-15 machines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one change request WRT to API - rest was just comments you can accept or ignore.
Purpose
Update libg (more debug logs)
Stabilize tests
Declarations
Check these if you believe they are true
*.resx
filesRelease Notes
(FILL ME IN) Brief description of the fix / enhancement. Use N/A to indicate that the changes in this pull request do not apply to Release Notes. Mandatory section
Reviewers
(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)
(FILL ME IN, optional) Any additional notes to reviewers or testers.
FYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of