From ffa78386f9f48b21b5b67596dffc0ecb53664e0b Mon Sep 17 00:00:00 2001 From: Carlos Nihelton Date: Mon, 11 Sep 2023 22:17:21 -0300 Subject: [PATCH] More resilent GUI integration test agent crashes --- .../integration_test/ubuntu_pro_for_windows_test.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gui/packages/ubuntupro/integration_test/ubuntu_pro_for_windows_test.dart b/gui/packages/ubuntupro/integration_test/ubuntu_pro_for_windows_test.dart index 0b4427437..605d6dc62 100644 --- a/gui/packages/ubuntupro/integration_test/ubuntu_pro_for_windows_test.dart +++ b/gui/packages/ubuntupro/integration_test/ubuntu_pro_for_windows_test.dart @@ -67,7 +67,7 @@ void main() { await buildAgentExe(agentDir); }); - tearDownAll(() async { + tearDown(() async { // kill all agent processes. if (Platform.isWindows) { await Process.run('taskkill.exe', ['/f', '/im', agentImageName]); @@ -79,6 +79,10 @@ void main() { [p.basenameWithoutExtension(agentImageName)], ); } + File(p.join(tmp!.path, 'Ubuntu Pro', 'addr')).deleteSync(); + }); + + tearDownAll(() async { // Finally deletes the directory. await Directory(agentDir).delete(recursive: true); });