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

Unified Diff: sdk/lib/_internal/pub/test/test_pub.dart

Issue 15184003: Add additional Schedule heartbeat calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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 | « sdk/lib/_internal/pub/lib/src/http.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/test/test_pub.dart
diff --git a/sdk/lib/_internal/pub/test/test_pub.dart b/sdk/lib/_internal/pub/test/test_pub.dart
index 6ac747b88d97fa2ddb36e475cfec60c3fb86c8e0..8d417edd1ef6aa220a942e84840e56cbcb4c9c30 100644
--- a/sdk/lib/_internal/pub/test/test_pub.dart
+++ b/sdk/lib/_internal/pub/test/test_pub.dart
@@ -100,10 +100,10 @@ void serve([List<d.Descriptor> contents]) {
return SafeHttpServer.bind("localhost", 0).then((server) {
_server = server;
server.listen((request) {
+ currentSchedule.heartbeat();
var response = request.response;
try {
var path = request.uri.path.replaceFirst("/", "");
- currentSchedule.addDebugInfo("[$path] got request");
if (_requestedPaths == null) _requestedPaths = <String>[];
_requestedPaths.add(path);
@@ -112,20 +112,17 @@ void serve([List<d.Descriptor> contents]) {
var stream = baseDir.load(path);
new ByteStream(stream).toBytes().then((data) {
- currentSchedule.addDebugInfo("[$path] sending response:\n"
- "${new String.fromCharCodes(data)}");
+ currentSchedule.heartbeat();
response.statusCode = 200;
response.contentLength = data.length;
response.add(data);
response.close();
}).catchError((e) {
- currentSchedule.addDebugInfo("[$path] got load error: $e");
response.statusCode = 404;
response.contentLength = 0;
response.close();
});
} catch (e) {
- currentSchedule.addDebugInfo("[$path] got error: $e");
currentSchedule.signalError(e);
response.statusCode = 500;
response.close();
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/http.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698