Update test API usage to non-deprecated members (#85)
diff --git a/.travis.yml b/.travis.yml
index 6db1706..100aac5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,4 @@
language: dart
-sudo: true
before_script:
# Add an IPv6 config - see the corresponding Travis issue
@@ -9,7 +8,7 @@
fi
dart:
- - 2.5.0
+ - 2.8.4
- dev
dart_task:
diff --git a/pubspec.yaml b/pubspec.yaml
index 4a94206..a5606ab 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,10 +1,11 @@
name: http_io
-author: "Dart Team <misc@dartlang.org>"
-homepage: https://github.com/dart-lang/http_io
+repository: https://github.com/dart-lang/http_io
description: HTTP Client and Server APIs.
+publish_to: none
+
environment:
- sdk: ">=2.5.0 <3.0.0"
+ sdk: ">=2.8.4 <3.0.0"
dev_dependencies:
convert: ^2.0.1
diff --git a/test/http_server_test.dart b/test/http_server_test.dart
index c7e5803..6a88ff3 100644
--- a/test/http_server_test.dart
+++ b/test/http_server_test.dart
@@ -168,7 +168,7 @@
Future<Null> testHttpServerZoneError() {
Completer<Null> completer = Completer();
Zone parent = Zone.current;
- runZoned(() {
+ runZonedGuarded(() {
expect(parent, isNot(equals(Zone.current)));
HttpServer.bind("127.0.0.1", 0).then((server) {
expect(parent, isNot(equals(Zone.current)));
@@ -187,7 +187,7 @@
socket.listen(null);
});
});
- }, onError: (e) {
+ }, (e, s) {
completer.complete(null);
});
return completer.future;
@@ -196,7 +196,7 @@
Future<Null> testHttpServerClientClose() {
Completer<Null> completer = Completer();
HttpServer.bind("127.0.0.1", 0).then((server) {
- runZoned(() {
+ runZonedGuarded(() {
server.listen((request) {
request.response.bufferOutput = false;
request.response.add(Uint8List(64 * 1024));
@@ -207,7 +207,7 @@
});
});
});
- }, onError: (e, s) {
+ }, (e, s) {
fail("Unexpected error: $e(${e.hashCode})\n$s");
});
var client = HttpClient();