File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ Future<StreamChannel<String>> _defaultOpenChannel(Uri uri) async {
5353 attempts += 1 ;
5454 try {
5555 socket = await io.WebSocket .connect (uri.toString ());
56- } on io. WebSocketException catch (e) {
56+ } catch (e) {
5757 printTrace ('Exception attempting to connect to observatory: $e ' );
5858 printTrace ('This was attempt #$attempts . Will retry in $delay .' );
5959 await new Future <Null >.delayed (delay);
Original file line number Diff line number Diff line change 44
55import 'package:test/test.dart' ;
66
7- import 'package:flutter_tools/src/base/io.dart' ;
87import 'package:flutter_tools/src/base/port_scanner.dart' ;
98import 'package:flutter_tools/src/vmservice.dart' ;
109
10+ import 'src/common.dart' ;
11+ import 'src/context.dart' ;
12+
1113void main () {
1214 group ('VMService' , () {
13- test ('fails connection eagerly in the connect() method' , () async {
15+ testUsingContext ('fails connection eagerly in the connect() method' , () async {
1416 final int port = await const HostPortScanner ().findAvailablePort ();
1517 expect (
1618 VMService .connect (Uri .parse ('http://localhost:$port ' )),
17- throwsA ( const isInstanceOf < SocketException >() ),
19+ throwsToolExit ( ),
1820 );
1921 });
2022 });
You can’t perform that action at this time.
0 commit comments