Skip to content

Commit af6b643

Browse files
committed
close webdriver/chrome before the client
1 parent d82794b commit af6b643

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

dwds/test/fixtures/context.dart

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class TestContext {
8989
'Could not start ChromeDriver. Is it installed?\nError: $e');
9090
}
9191

92-
await Process.run('pub$_batExt', ['get'],
92+
await Process.run('pub$_batExt', ['upgrade'],
9393
workingDirectory: workingDirectory);
9494

9595
daemonClient = await connectClient(
@@ -152,27 +152,17 @@ class TestContext {
152152
appConnection = await testServer.dwds.connectedApps.first;
153153
if (enableDebugging) {
154154
debugConnection = await testServer.dwds.debugConnection(appConnection);
155-
await debugConnection.vmService.streamListen('Isolate');
156-
await debugConnection.vmService.onIsolateEvent
157-
.firstWhere((e) => e.kind == 'IsolateStart');
158155
webkitDebugger = WebkitDebugger(WipDebugger(tabConnection));
159156
}
160157
}
161158

162159
Future<Null> tearDown() async {
163-
/// A hack to make sure we wait until all scripts are loaded
164-
/// before exiting, otherwise we get async errors after the test
165-
/// and it makes them flaky.
166-
await debugConnection.vmService.getScripts(
167-
(await debugConnection.vmService.getVM()).isolates.first.id);
168-
await debugConnection.close();
169-
160+
await webDriver?.quit();
161+
chromeDriver?.kill();
170162
DartUri.currentDirectory = p.current;
171163
_entryFile.writeAsStringSync(_entryContents);
172164
await daemonClient?.close();
173165
await testServer?.stop();
174-
await webDriver?.quit();
175-
chromeDriver.kill();
176166
}
177167

178168
Future<void> changeInput() async {

0 commit comments

Comments
 (0)