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"; |