Index: pkg/analysis_server/test/channel/byte_stream_channel_test.dart |
diff --git a/pkg/analysis_server/test/channel/byte_stream_channel_test.dart b/pkg/analysis_server/test/channel/byte_stream_channel_test.dart |
index 4a5631b04414036ba3db42a9fa42008941fdc9f6..776b6d2026eca3b20c0603b560cda7a705ff51c7 100644 |
--- a/pkg/analysis_server/test/channel/byte_stream_channel_test.dart |
+++ b/pkg/analysis_server/test/channel/byte_stream_channel_test.dart |
@@ -14,8 +14,10 @@ import 'package:analyzer/instrumentation/instrumentation.dart'; |
import 'package:unittest/unittest.dart'; |
import '../mocks.dart'; |
+import '../utils.dart'; |
main() { |
+ initializeTestEnvironment(); |
group('ByteStreamClientChannel', () { |
setUp(ByteStreamClientChannelTest.setUp); |
test('close', ByteStreamClientChannelTest.close); |
@@ -215,8 +217,9 @@ class ByteStreamServerChannelTest { |
static Future sendNotification() { |
channel.sendNotification(new Notification('foo')); |
- return outputLineStream.first.timeout(new Duration(seconds: 1)).then( |
- (String notification) { |
+ return outputLineStream.first |
+ .timeout(new Duration(seconds: 1)) |
+ .then((String notification) { |
var jsonNotification = new JsonCodec().decode(notification); |
expect(jsonNotification, isMap); |
expect(jsonNotification, contains('event')); |
@@ -226,8 +229,9 @@ class ByteStreamServerChannelTest { |
static Future sendResponse() { |
channel.sendResponse(new Response('foo')); |
- return outputLineStream.first.timeout(new Duration(seconds: 1)).then( |
- (String response) { |
+ return outputLineStream.first |
+ .timeout(new Duration(seconds: 1)) |
+ .then((String response) { |
var jsonResponse = new JsonCodec().decode(response); |
expect(jsonResponse, isMap); |
expect(jsonResponse, contains('id')); |