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

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

Issue 638333002: Take two at fixing duplicate alert failures. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!-- 1 <!--
2 Copyright 2014 The Chromium Authors. All rights reserved. 2 Copyright 2014 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be 3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file. 4 found in the LICENSE file.
5 --> 5 -->
6 6
7 <link rel="import" href="../ct-failures.html"> 7 <link rel="import" href="../ct-failures.html">
8 8
9 <link rel="import" href="../../lib/network-simulator.html"> 9 <link rel="import" href="../../lib/network-simulator.html">
10 <link rel="import" href="../ct-commit-list.html"> 10 <link rel="import" href="../ct-commit-list.html">
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 v8: 50, 263 v8: 50,
264 chromium: 200, 264 chromium: 200,
265 }, 265 },
266 merged_last_passing: { 266 merged_last_passing: {
267 blink: 50, 267 blink: 50,
268 nacl: 50, 268 nacl: 50,
269 v8: 50, 269 v8: 50,
270 chromium: 199, 270 chromium: 199,
271 }, 271 },
272 }, 272 },
273 {
274 sort_key: 'mac: Mac Tests',
275 failure_keys: [ 'f3', ],
276 likely_revisions: [
277 'chromium: 100',
278 'chromium: 101',
279 ],
280 merged_first_failing: {
281 blink: 50,
282 nacl: 50,
283 v8: 50,
284 chromium: 200,
285 },
286 merged_last_passing: {
287 blink: 50,
288 nacl: 50,
289 v8: 50,
290 chromium: 199,
291 },
292 },
273 ], 293 ],
274 alerts: [ 294 alerts: [
275 { 295 {
276 last_result_time: 1409697347.089103, 296 last_result_time: 1409697347.089103,
277 passing_build: 2485, 297 passing_build: 2485,
278 last_failing_build: 2489, 298 last_failing_build: 2489,
279 failing_build: 2486, 299 failing_build: 2486,
280 latest_revisions: { 300 latest_revisions: {
281 v8: 50, 301 v8: 50,
282 chromium: 103, 302 chromium: 103,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 step_name: "foo_tests", 347 step_name: "foo_tests",
328 tree: 'chromium', 348 tree: 'chromium',
329 passing_revisions: { 349 passing_revisions: {
330 v8: 50, 350 v8: 50,
331 chromium: 99, 351 chromium: 99,
332 nacl: 50, 352 nacl: 50,
333 blink: 50 353 blink: 50
334 }, 354 },
335 would_close_tree: true 355 would_close_tree: true
336 }, 356 },
357 {
358 last_result_time: 1409697347.089103,
359 passing_build: 2485,
360 last_failing_build: 2489,
361 failing_build: 2486,
362 latest_revisions: {
363 v8: 50,
364 chromium: 103,
365 nacl: 50,
366 blink: 51
367 },
368 master_url: "https://build.chromium.org/p/chromium.mac",
369 reason: null,
370 failing_revisions: {
371 v8: 50,
372 chromium: 101,
373 nacl: 50,
374 blink: 50
375 },
376 builder_name: "Mac Tests",
377 key: "f3",
378 step_name: "compile",
379 tree: 'chromium',
380 passing_revisions: {
381 v8: 50,
382 chromium: 99,
383 nacl: 50,
384 blink: 50
385 },
386 would_close_tree: true
387 },
337 ], 388 ],
338 date: 1409697816.726562, 389 date: 1409697816.726562,
339 }, 390 },
340 'trooper-o-matic.appspot.com/alerts': { 391 'trooper-o-matic.appspot.com/alerts': {
341 392
342 } 393 }
343 } 394 }
344 simulator.json = function(url) { 395 simulator.json = function(url) {
345 var matched = Object.find(netData, function(key) { 396 var matched = Object.find(netData, function(key) {
346 return url.indexOf(key) != -1; 397 return url.indexOf(key) != -1;
347 }); 398 });
348 if (matched) { 399 if (matched) {
349 return Promise.resolve(netData[matched]); 400 return Promise.resolve(netData[matched]);
350 } else { 401 } else {
351 return Promise.reject('Unexpected url: ' + url); 402 return Promise.reject('Unexpected url: ' + url);
352 } 403 }
353 }; 404 };
354 simulator.runTest(function() { 405 simulator.runTest(function() {
355 var analyzer = new CTFailures(CTCommitLogMock()); 406 var analyzer = new CTFailures(CTCommitLogMock());
356 return analyzer.update().then(function() { 407 return analyzer.update().then(function() {
357 assert.property(analyzer.failures, 'chromium'); 408 assert.property(analyzer.failures, 'chromium');
358 assert.lengthOf(analyzer.failures.chromium, 3); 409 assert.lengthOf(analyzer.failures.chromium, 4);
359 var masterFailureGroup = analyzer.failures.chromium[0]; 410 var masterFailureGroup = analyzer.failures.chromium[0];
360 var testFailureGroup = analyzer.failures.chromium[1]; 411 var testFailureGroup = analyzer.failures.chromium[1];
361 var compileFailureGroup = analyzer.failures.chromium[2]; 412 var compileFailureGroup = analyzer.failures.chromium[2];
413 var macCompileFailureGroup = analyzer.failures.chromium[3];
362 assert.equal(compileFailureGroup.constructor, CTFailureGroup); 414 assert.equal(compileFailureGroup.constructor, CTFailureGroup);
363 assert.equal(compileFailureGroup.key, 'compile::null'); 415 assert.equal(compileFailureGroup.key, 'compile::Linux Tests (dbg)(1)') ;
364 assert.lengthOf(compileFailureGroup.data.failures, 1); 416 assert.lengthOf(compileFailureGroup.data.failures, 1);
365 var failure = compileFailureGroup.data.failures[0]; 417 var failure = compileFailureGroup.data.failures[0];
366 assert.equal(failure.constructor, CTStepFailure); 418 assert.equal(failure.constructor, CTStepFailure);
367 assert.equal(failure.key, 'compile::null'); 419 assert.equal(failure.key, 'compile::Linux Tests (dbg)(1)');
368 assert.equal(failure.step, 'compile'); 420 assert.equal(failure.step, 'compile');
369 assert.equal(failure.testName, null); 421 assert.equal(failure.testName, null);
370 var resultNodesByBuilder = failure.resultNodesByBuilder; 422 var resultNodesByBuilder = failure.resultNodesByBuilder;
371 assert.property(resultNodesByBuilder, 'Linux Tests (dbg)(1)'); 423 assert.property(resultNodesByBuilder, 'Linux Tests (dbg)(1)');
372 var dbgBuilder = resultNodesByBuilder['Linux Tests (dbg)(1)']; 424 var dbgBuilder = resultNodesByBuilder['Linux Tests (dbg)(1)'];
373 assert.propertyVal(dbgBuilder, 'actual', 'UNKNOWN'); 425 assert.propertyVal(dbgBuilder, 'actual', 'UNKNOWN');
374 assert.propertyVal(dbgBuilder, 'lastFailingBuild', 2489); 426 assert.propertyVal(dbgBuilder, 'lastFailingBuild', 2489);
375 assert.propertyVal(dbgBuilder, 'masterUrl', 'https://build.chromium.or g/p/chromium.linux'); 427 assert.propertyVal(dbgBuilder, 'masterUrl', 'https://build.chromium.or g/p/chromium.linux');
376 assert.propertyVal(dbgBuilder, 'failingBuildCount', 4); 428 assert.propertyVal(dbgBuilder, 'failingBuildCount', 4);
377 assert.property(analyzer.failures, 'blink'); 429 assert.property(analyzer.failures, 'blink');
(...skipping 10 matching lines...) Expand all
388 // Flip |expanded| to true to check that it's preserved across updates . 440 // Flip |expanded| to true to check that it's preserved across updates .
389 repositoryCommitList.expanded = true; 441 repositoryCommitList.expanded = true;
390 442
391 // Update |netData| to make sure it's propagated into the updated valu es. 443 // Update |netData| to make sure it's propagated into the updated valu es.
392 netData['sheriff-o-matic.appspot.com/alerts'].alerts[0].last_failing_b uild = 2490; 444 netData['sheriff-o-matic.appspot.com/alerts'].alerts[0].last_failing_b uild = 2490;
393 445
394 return analyzer.update().then(function() { 446 return analyzer.update().then(function() {
395 assert.strictEqual(analyzer.failures.chromium[0], masterFailureGroup ) 447 assert.strictEqual(analyzer.failures.chromium[0], masterFailureGroup )
396 assert.strictEqual(analyzer.failures.chromium[1], testFailureGroup) 448 assert.strictEqual(analyzer.failures.chromium[1], testFailureGroup)
397 assert.strictEqual(analyzer.failures.chromium[2], compileFailureGrou p) 449 assert.strictEqual(analyzer.failures.chromium[2], compileFailureGrou p)
450 assert.strictEqual(analyzer.failures.chromium[3], macCompileFailureG roup)
398 assert.strictEqual(compileFailureGroup.data.failures[0], failure) 451 assert.strictEqual(compileFailureGroup.data.failures[0], failure)
399 assert.strictEqual(failure.resultNodesByBuilder, resultNodesByBuilde r); 452 assert.strictEqual(failure.resultNodesByBuilder, resultNodesByBuilde r);
400 assert.strictEqual(resultNodesByBuilder['Linux Tests (dbg)(1)'], dbg Builder); 453 assert.strictEqual(resultNodesByBuilder['Linux Tests (dbg)(1)'], dbg Builder);
401 assert.propertyVal(dbgBuilder, 'lastFailingBuild', 2490); 454 assert.propertyVal(dbgBuilder, 'lastFailingBuild', 2490);
402 455
403 assert.strictEqual(compileFailureGroup.data.commitList, commitList); 456 assert.strictEqual(compileFailureGroup.data.commitList, commitList);
404 assert.strictEqual(commitList.repositories[0], repositoryCommitList) ; 457 assert.strictEqual(commitList.repositories[0], repositoryCommitList) ;
405 assert.propertyVal(repositoryCommitList, 'expanded', true); 458 assert.propertyVal(repositoryCommitList, 'expanded', true);
406 }); 459 });
407 }); 460 });
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 analyzer._processFailuresForRangeGroup(newFailures, range_groups, alertsBy Key, annotations) 506 analyzer._processFailuresForRangeGroup(newFailures, range_groups, alertsBy Key, annotations)
454 assert.ok('test-tree' in newFailures) 507 assert.ok('test-tree' in newFailures)
455 assert.notOk('chromium' in newFailures) 508 assert.notOk('chromium' in newFailures)
456 }); 509 });
457 }); 510 });
458 511
459 }); 512 });
460 513
461 })() 514 })()
462 </script> 515 </script>
OLDNEW
« no previous file with comments | « Tools/GardeningServer/model/ct-step-failure.html ('k') | Tools/GardeningServer/model/test/ct-step-failure-tests.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698