Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Unified Diff: lib/src/runner/loader.dart

Issue 1290763003: Drop support for old SDK and shelf versions. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/runner/configuration.dart ('k') | lib/src/util/dart.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/loader.dart
diff --git a/lib/src/runner/loader.dart b/lib/src/runner/loader.dart
index 9036248f0aab06c75211261cd85e1f7bbfe7332a..68f94d6f7fe031760200b3a01adfd584d5792030 100644
--- a/lib/src/runner/loader.dart
+++ b/lib/src/runner/loader.dart
@@ -152,29 +152,25 @@ class Loader {
var url = _config.pubServeUrl.resolveUri(
p.toUri(p.relative(path, from: 'test') + '.vm_test.dart'));
- // TODO(nweiz): Remove new Future.sync() once issue 23498 has been fixed
- // in two stable versions.
- await new Future.sync(() async {
- try {
- isolate = await dart.spawnUri(url, {
- 'reply': receivePort.sendPort,
- 'metadata': metadata.serialize()
- }, checked: true);
- } on IsolateSpawnException catch (error) {
- if (error.message.contains("OS Error: Connection refused") ||
- error.message.contains("The remote computer refused")) {
- throw new LoadException(path,
- "Error getting $url: Connection refused\n"
- 'Make sure "pub serve" is running.');
- } else if (error.message.contains("404 Not Found")) {
- throw new LoadException(path,
- "Error getting $url: 404 Not Found\n"
- 'Make sure "pub serve" is serving the test/ directory.');
- }
-
- throw new LoadException(path, error);
+ try {
+ isolate = await Isolate.spawnUri(url, [], {
+ 'reply': receivePort.sendPort,
+ 'metadata': metadata.serialize()
+ }, checked: true);
+ } on IsolateSpawnException catch (error) {
+ if (error.message.contains("OS Error: Connection refused") ||
+ error.message.contains("The remote computer refused")) {
+ throw new LoadException(path,
+ "Error getting $url: Connection refused\n"
+ 'Make sure "pub serve" is running.');
+ } else if (error.message.contains("404 Not Found")) {
+ throw new LoadException(path,
+ "Error getting $url: 404 Not Found\n"
+ 'Make sure "pub serve" is serving the test/ directory.');
}
- });
+
+ throw new LoadException(path, error);
+ }
} else {
isolate = await dart.runInIsolate('''
import "package:test/src/backend/metadata.dart";
« no previous file with comments | « lib/src/runner/configuration.dart ('k') | lib/src/util/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698