Skip to content

Commit ab1d364

Browse files
committed
Use proper AssemblyCleanup
Do not send close app message
1 parent e518db1 commit ab1d364

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

UITests/UITests.App/App.AppService.xaml.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ private async void OnAppServiceRequestReceived(AppServiceConnection sender, AppS
6565

6666
await args.Request.SendResponseAsync(pageResponse ? OkResult : BadResult);
6767

68-
break;
69-
case "Close":
70-
Current.Exit();
71-
await args.Request.SendResponseAsync(OkResult);
7268
break;
7369
default:
7470
break;

UITests/UITests.Tests.Shared/TestAssembly.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ public static void AssemblyInitialize(TestContext testContext)
3636
[AssemblyCleanup]
3737
public static void AssemblyCleanup()
3838
{
39-
TestEnvironment.AssemblyCleanup();
40-
CloseTestApp();
39+
TestEnvironment.AssemblyCleanupWorker(UITestBase.WinUICsUWPSampleApp);
4140
}
4241

4342
private static async Task InitalizeComService()
@@ -64,8 +63,6 @@ private static async Task InitalizeComService()
6463
}
6564
}
6665

67-
private static Task<bool> CloseTestApp() => SendMessageToApp(new () { { "Command", "Close" } });
68-
6966
internal static Task<bool> OpenPage(string pageName)
7067
{
7168
Log.Comment("[Harness] Sending Host Page Request: {0}", pageName);

0 commit comments

Comments
 (0)