Skip to content

Commit 3d0cee2

Browse files
committed
More output
1 parent 5d7390c commit 3d0cee2

File tree

2 files changed

+27
-14
lines changed

2 files changed

+27
-14
lines changed

dwds/test/fixtures/context.dart

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -434,23 +434,34 @@ class TestContext {
434434
'${identityHashCode(_chromeDriver)}',
435435
);
436436
try {
437-
_webDriver = await createDriver(
438-
spec: WebDriverSpec.JsonWire,
439-
desired: capabilities,
440-
uri: Uri.parse(
441-
'http://127.0.0.1:$chromeDriverPort/$chromeDriverUrlBase/',
442-
),
437+
final localWebDriver =
438+
_webDriver = await createDriver(
439+
spec: WebDriverSpec.JsonWire,
440+
desired: capabilities,
441+
uri: Uri.parse(
442+
'http://127.0.0.1:$chromeDriverPort/$chromeDriverUrlBase/',
443+
),
444+
);
445+
log(
446+
'After first try: _webDriver = $_webDriver; '
447+
'localWebDriver = $localWebDriver',
443448
);
444449
} on SocketException catch (e) {
445450
log('Got "$e". Will wait a bit and try again.');
446451
await Future.delayed(const Duration(seconds: 2));
452+
log('Back after the wait. Will now try again.');
447453
try {
448-
_webDriver = await createDriver(
449-
spec: WebDriverSpec.JsonWire,
450-
desired: capabilities,
451-
uri: Uri.parse(
452-
'http://127.0.0.1:$chromeDriverPort/$chromeDriverUrlBase/',
453-
),
454+
final localWebDriver =
455+
_webDriver = await createDriver(
456+
spec: WebDriverSpec.JsonWire,
457+
desired: capabilities,
458+
uri: Uri.parse(
459+
'http://127.0.0.1:$chromeDriverPort/$chromeDriverUrlBase/',
460+
),
461+
);
462+
log(
463+
'After second try: _webDriver = $_webDriver; '
464+
'localWebDriver = $localWebDriver',
454465
);
455466
} on SocketException catch (e) {
456467
log('Got exception again: "$e"');
@@ -459,6 +470,8 @@ class TestContext {
459470
}
460471
}
461472

473+
log('Is now after the testSettings.launchChrome stuff.');
474+
462475
// The debugger tab must be enabled and connected before certain
463476
// listeners in DWDS or `main` is run.
464477
final tabConnectionCompleter = Completer();

dwds/test/hot_restart_breakpoints_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void main() {
4949
late Stream<Event> stream;
5050
// Fetch the log statements that are sent to console.
5151
final consoleLogs = <String>[];
52-
late StreamSubscription<ConsoleAPIEvent> consoleSubscription;
52+
StreamSubscription<ConsoleAPIEvent>? consoleSubscription;
5353

5454
setUp(() async {
5555
setCurrentLogWriter(debug: debug);
@@ -74,7 +74,7 @@ void main() {
7474
});
7575

7676
tearDown(() async {
77-
await consoleSubscription.cancel();
77+
await consoleSubscription?.cancel();
7878
consoleLogs.clear();
7979
await context.tearDown();
8080
});

0 commit comments

Comments
 (0)