-
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 pt2 #15779
Stabilize tests pt2 #15779
Conversation
UI Smoke TestsTest: success. 11 passed, 0 failed. |
System.Console.WriteLine($"PID {Process.GetCurrentProcess().Id} Start test: {TestContext.CurrentContext.Test.Name}"); | ||
TestUtilities.WebView2Tag = TestContext.CurrentContext.Test.Name; | ||
|
||
SynchronizationContext.SetSynchronizationContext(new DispatcherSynchronizationContext()); |
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 this because the tests don't run in the UI thread by default?
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.
This code was simply moved to a new utility class, but the reasons for it (when it was added way back) was that tests were running on non UI threads
System.Console.WriteLine($"PID {id} Finished test: {name} with DispatcherOpsCounter = {DispatcherOpsCounter}"); | ||
System.Console.WriteLine($"PID {id} Finished test: {name} with WorkingSet = {currentProc.WorkingSet64}"); | ||
System.Console.WriteLine($"PID {id} Finished test: {name} with PrivateBytes = {currentProc.PrivateMemorySize64}"); | ||
System.Console.Write($"PID {id} Finished test: {name} with GC Memory Info: "); | ||
PrettyPrint(GC.GetGCMemoryInfo()); | ||
} |
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 these metrics expected to be nearly the same as before the tests started?
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.
In a perfect world, with no memory leaks, yes
Purpose
More test fixes:
Removed "SplashScreen close button" tests (why? because the close button was removed from the UI)
Moved Webview2 app data location in per component folders (inside the test subfolder so that it gets cleaned up after each CICD job automatically)
Moved Serialization test data to a per process folder (so that we do not have cross contamination between parallel tests)
Switched to GUIDs in the serialization tests so that the filtering system does not get confused (test methods sometimes had the same name as dyn files)
Moved some diagnostic logging and dispatcher logic to a new utility class "TestDiagnostics" so that other tests can use them easily.
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