File tree 2 files changed +6
-4
lines changed
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 {
53
53
attempts += 1 ;
54
54
try {
55
55
socket = await io.WebSocket .connect (uri.toString ());
56
- } on io. WebSocketException catch (e) {
56
+ } catch (e) {
57
57
printTrace ('Exception attempting to connect to observatory: $e ' );
58
58
printTrace ('This was attempt #$attempts . Will retry in $delay .' );
59
59
await new Future <Null >.delayed (delay);
Original file line number Diff line number Diff line change 4
4
5
5
import 'package:test/test.dart' ;
6
6
7
- import 'package:flutter_tools/src/base/io.dart' ;
8
7
import 'package:flutter_tools/src/base/port_scanner.dart' ;
9
8
import 'package:flutter_tools/src/vmservice.dart' ;
10
9
10
+ import 'src/common.dart' ;
11
+ import 'src/context.dart' ;
12
+
11
13
void main () {
12
14
group ('VMService' , () {
13
- test ('fails connection eagerly in the connect() method' , () async {
15
+ testUsingContext ('fails connection eagerly in the connect() method' , () async {
14
16
final int port = await const HostPortScanner ().findAvailablePort ();
15
17
expect (
16
18
VMService .connect (Uri .parse ('http://localhost:$port ' )),
17
- throwsA ( const isInstanceOf < SocketException >() ),
19
+ throwsToolExit ( ),
18
20
);
19
21
});
20
22
});
You can’t perform that action at this time.
0 commit comments