From 77efddcac3e68648dbffb439f2ab408709f1f44c Mon Sep 17 00:00:00 2001 From: Wagner Maciel Date: Wed, 3 Jun 2020 16:39:01 -0700 Subject: [PATCH] fix(dev-infra): await setup in runBenchmark (#37428) * Fix for issue #36986. * Changes runBenchmark into an async function. * Awaits config.setup in runBenchmark. PR Close #37428 --- dev-infra/benchmark/driver-utilities/perf_util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev-infra/benchmark/driver-utilities/perf_util.ts b/dev-infra/benchmark/driver-utilities/perf_util.ts index ddbca10e19..a48d841b32 100644 --- a/dev-infra/benchmark/driver-utilities/perf_util.ts +++ b/dev-infra/benchmark/driver-utilities/perf_util.ts @@ -22,7 +22,7 @@ const globalOptions = { const runner = createBenchpressRunner(); -export function runBenchmark(config: { +export async function runBenchmark(config: { id: string, url: string, params: {name: string, value: any}[], @@ -34,7 +34,7 @@ export function runBenchmark(config: { }): Promise { openBrowser(config); if (config.setup) { - config.setup(); + await config.setup(); } const description: {[key: string]: any} = {}; config.params.forEach((param) => description[param.name] = param.value);