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

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

Issue 546433003: Add failed_once category to Sheriff-O-Matic. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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-failure-group-tests.html
diff --git a/Tools/GardeningServer/model/test/ct-failure-group-tests.html b/Tools/GardeningServer/model/test/ct-failure-group-tests.html
index f94c7eb41f117022db8aaa3186431364bb864f4e..83ca07fb8b257f5ab05a2d311b60645d29483d6c 100644
--- a/Tools/GardeningServer/model/test/ct-failure-group-tests.html
+++ b/Tools/GardeningServer/model/test/ct-failure-group-tests.html
@@ -34,6 +34,21 @@ describe('ct-failure-group', function() {
var group = new CTFailureGroup([newFailureWithAnnotation({snoozeTime: Date.now() + 1000 * 1000})], undefined);
assert.equal(group.category, 'snoozed');
});
+
+ it('should be "failed_once" when there is only one failure', function() {
+ var failure = newFailureWithAnnotation();
+ failure.resultNodesByBuilder = {some_key: {failingBuildCount: 1}}
+ var group = new CTFailureGroup([failure], undefined);
+ assert.equal(group.category, 'failed_once');
+ });
+
+ it('should not be "failed_once" when there is more than one failure', function() {
+ var failure = newFailureWithAnnotation();
+ failure.resultNodesByBuilder = {some_key: {failingBuildCount: 1},
+ other_key: {failingBuildCount: 1}}
+ var group = new CTFailureGroup([failure], undefined);
+ assert.equal(group.category, 'default');
+ });
});
describe('snooze', function() {

Powered by Google App Engine
This is Rietveld 408576698