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

Side by Side Diff: lib/scheduled_server.dart

Issue 1152453009: pkg/scheduled_test: fix analyzer hints (Closed) Base URL: https://github.com/dart-lang/scheduled_test.git@master
Patch Set: nits Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « lib/scheduled_process.dart ('k') | lib/src/descriptor/directory_descriptor.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library scheduled_test.scheduled_server; 5 library scheduled_test.scheduled_server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:io'; 9 import 'dart:io';
10 10
11 import 'package:http_multi_server/http_multi_server.dart'; 11 import 'package:http_multi_server/http_multi_server.dart';
12 import 'package:shelf/shelf.dart' as shelf; 12 import 'package:shelf/shelf.dart' as shelf;
13 import 'package:shelf/shelf_io.dart' as shelf_io; 13 import 'package:shelf/shelf_io.dart' as shelf_io;
14 14
15 import 'scheduled_test.dart'; 15 import 'scheduled_test.dart';
16 import 'src/scheduled_server/handler.dart'; 16 import 'src/scheduled_server/handler.dart';
17 import 'src/utils.dart';
18 17
19 /// A class representing an HTTP server that's scheduled to run in the course of 18 /// A class representing an HTTP server that's scheduled to run in the course of
20 /// the test. This class allows the server's request handling to be scheduled 19 /// the test. This class allows the server's request handling to be scheduled
21 /// synchronously. 20 /// synchronously.
22 /// 21 ///
23 /// The server expects requests to be received in the order [handle] is called, 22 /// The server expects requests to be received in the order [handle] is called,
24 /// and expects that no additional requests will be received. 23 /// and expects that no additional requests will be received.
25 class ScheduledServer { 24 class ScheduledServer {
26 /// The description of the server. 25 /// The description of the server.
27 final String description; 26 final String description;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 return _handlers.removeFirst().fn(request); 96 return _handlers.removeFirst().fn(request);
98 }).catchError((error, stackTrace) { 97 }).catchError((error, stackTrace) {
99 registerException(error, stackTrace); 98 registerException(error, stackTrace);
100 99
101 return new shelf.Response.internalServerError( 100 return new shelf.Response.internalServerError(
102 body: error.toString(), 101 body: error.toString(),
103 headers: {'content-type': 'text/plain'}); 102 headers: {'content-type': 'text/plain'});
104 }); 103 });
105 } 104 }
106 } 105 }
OLDNEW
« no previous file with comments | « lib/scheduled_process.dart ('k') | lib/src/descriptor/directory_descriptor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698