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

Unified Diff: Tools/GardeningServer/model/test/ct-failures-tests.html

Issue 661463004: Include all hung bots alerts in Trooper tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Nit (fix line wraps). Created 6 years, 2 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
Index: Tools/GardeningServer/model/test/ct-failures-tests.html
diff --git a/Tools/GardeningServer/model/test/ct-failures-tests.html b/Tools/GardeningServer/model/test/ct-failures-tests.html
index 925d5306ff7a22c9f29e3f05a494cb3498989d3b..e61460b8eea579c38d573091162a5836d7b4433d 100644
--- a/Tools/GardeningServer/model/test/ct-failures-tests.html
+++ b/Tools/GardeningServer/model/test/ct-failures-tests.html
@@ -413,7 +413,7 @@ describe('ct-failures', function() {
it('should filter out updates that are not alerts', function() {
var analyzer = new CTFailures(new CTCommitList(undefined, []));
analyzer.failures = {};
- analyzer._processTrooperFailures(
+ analyzer._processTrooperFailures({},
{'key_1': {'tree_1': {should_alert: true, should_appear: true},
'tree_2': {should_alert: false, should_appear: false}},
'key_2': {'tree_3': {should_alert: false, should_appear: false},
@@ -425,6 +425,25 @@ describe('ct-failures', function() {
});
});
+ describe('processTrooperFailures', function() {
+ it('should list all failures with category builder and master', function() {
+ var emptycl = new CTCommitList(undefined, []);
+ var emptygd = new CTStepFailureGroupData([], emptycl);
ojan 2014/10/16 21:20:39 We've been avoiding acronyms except for standard o
navabi 2014/10/16 23:56:05 Done.
+ var group1 = new CTFailureGroup('', emptygd, 'builder');
+ var group2 = new CTFailureGroup('', emptygd, 'failedOnce');
+ var group3 = new CTFailureGroup('', emptygd, 'master');
+
+ var analyzer = new CTFailures(new CTCommitList(undefined, []));
+ analyzer.failures = {};
+ analyzer._processTrooperFailures(
+ {'tree_1': [group1], 'tree_2': [group2, group3]}, {});
+ analyzer.failures['trooper'].forEach(function(failure) {
+ assert(failure.category == 'builder' || failure.category == 'master');
+ });
+ assert(analyzer.failures['trooper'].length == 2);
+ });
+ });
+
describe('processFailuresForRangeGroup', function() {
it('should use tree name from json', function() {
var analyzer = new CTFailures(null);
« Tools/GardeningServer/model/ct-failures.html ('K') | « Tools/GardeningServer/model/ct-failures.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698