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

Side by Side Diff: tools/gardening/lib/src/client.dart

Issue 3000953002: Use Bot in compare_failures (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « tools/gardening/lib/src/bot.dart ('k') | tools/gardening/lib/src/compare_failures_impl.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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'dart:async' hide TimeoutException; 5 import 'dart:async' hide TimeoutException;
6 import 'dart:io' hide HttpException; 6 import 'dart:io' hide HttpException;
7 7
8 import 'buildbot_data.dart'; 8 import 'buildbot_data.dart';
9 import 'buildbot_loading.dart'; 9 import 'buildbot_loading.dart';
10 import 'buildbot_structures.dart'; 10 import 'buildbot_structures.dart';
(...skipping 17 matching lines...) Expand all
28 28
29 @override 29 @override
30 Future<BuildResult> readResult(BuildUri buildUri) async { 30 Future<BuildResult> readResult(BuildUri buildUri) async {
31 Duration timeout; 31 Duration timeout;
32 if (buildUri.buildNumber < 0) { 32 if (buildUri.buildNumber < 0) {
33 timeout = new Duration(seconds: 1); 33 timeout = new Duration(seconds: 1);
34 } 34 }
35 35
36 void skipToPreviousBuildNumber() { 36 void skipToPreviousBuildNumber() {
37 BuildUri prevBuildUri = buildUri.prev(); 37 BuildUri prevBuildUri = buildUri.prev();
38 log('Skip build number ' 38 log('Skip build number on ${buildUri} -> ${prevBuildUri.buildNumber}');
39 '${buildUri.buildNumber} -> ${prevBuildUri.buildNumber}');
40 buildUri = buildUri.prev(); 39 buildUri = buildUri.prev();
41 } 40 }
42 41
43 while (true) { 42 while (true) {
44 try { 43 try {
45 return await readBuildResultFromHttp(_client, buildUri, timeout); 44 return await readBuildResultFromHttp(_client, buildUri, timeout);
46 } on TimeoutException { 45 } on TimeoutException {
47 if (timeout != null) { 46 if (timeout != null) {
48 skipToPreviousBuildNumber(); 47 skipToPreviousBuildNumber();
49 continue; 48 continue;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 buildUri = buildUri.withBuildNumber(buildNumber); 112 buildUri = buildUri.withBuildNumber(buildNumber);
114 } 113 }
115 } 114 }
116 } 115 }
117 116
118 @override 117 @override
119 void close() { 118 void close() {
120 // Nothing to do. 119 // Nothing to do.
121 } 120 }
122 } 121 }
OLDNEW
« no previous file with comments | « tools/gardening/lib/src/bot.dart ('k') | tools/gardening/lib/src/compare_failures_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698