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

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: Remove comment and fix var names. 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
« no previous file with comments | « Tools/GardeningServer/model/ct-failures.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4edcf5072185965e96366ad850e18a0c8f772306 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 emptyCommit = new CTCommitList(undefined, []);
+ var emptyGroupData = new CTStepFailureGroupData([], emptyCommit);
+ var group1 = new CTFailureGroup('', emptyGroupData, 'builder');
+ var group2 = new CTFailureGroup('', emptyGroupData, 'failedOnce');
+ var group3 = new CTFailureGroup('', emptyGroupData, '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);
« no previous file with comments | « Tools/GardeningServer/model/ct-failures.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698