From 97e6fb68359fe50e7fdd49d16200cff78e970e3e Mon Sep 17 00:00:00 2001 From: Tobias Bosch Date: Tue, 21 Apr 2015 10:11:59 -0700 Subject: [PATCH] fix(benchmarks): wait for end of benchmarks --- modules/angular2/src/test_lib/perf_util.es6 | 2 +- modules/benchmarks/e2e_test/largetable_perf.es6 | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/angular2/src/test_lib/perf_util.es6 b/modules/angular2/src/test_lib/perf_util.es6 index 241b35eb92..c857f5d06a 100644 --- a/modules/angular2/src/test_lib/perf_util.es6 +++ b/modules/angular2/src/test_lib/perf_util.es6 @@ -33,7 +33,7 @@ function runBenchmark(config) { } var url = encodeURI(config.url + '?' + urlParams.join('&')); return browser.get(url).then(function() { - benchpressRunner.sample({ + return benchpressRunner.sample({ id: config.id, execute: config.work, prepare: config.prepare, diff --git a/modules/benchmarks/e2e_test/largetable_perf.es6 b/modules/benchmarks/e2e_test/largetable_perf.es6 index 9c34ff26c5..6b0cd673fd 100644 --- a/modules/benchmarks/e2e_test/largetable_perf.es6 +++ b/modules/benchmarks/e2e_test/largetable_perf.es6 @@ -18,7 +18,7 @@ describe('ng2 largetable benchmark', function () { 'interpolationAttr', 'interpolationFn' ].forEach(function(benchmarkType) { - it('should log the ng stats with: ' + benchmarkType, function() { + it('should log the ng stats with: ' + benchmarkType, function(done) { console.log('executing for type', benchmarkType); perfUtil.runClickBenchmark({ url: URL, @@ -36,12 +36,12 @@ describe('ng2 largetable benchmark', function () { name: 'benchmarkType', value: benchmarkType }] - }); + }).then(done, done.fail); }); }); - it('should log the baseline stats', function() { + it('should log the baseline stats', function(done) { perfUtil.runClickBenchmark({ url: URL, buttons: ['#baselineDestroyDom', '#baselineCreateDom'], @@ -58,7 +58,7 @@ describe('ng2 largetable benchmark', function () { name: 'benchmarkType', value: 'baseline' }] - }); + }).then(done, done.fail);; }); });