From 884860b803d12c2cf06b1923fc69f5a7d11861b4 Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Wed, 13 May 2020 17:19:07 -0700 Subject: [PATCH] test: unflake launcher test (#2224) We throw an exception and then gracefully close the browser. If something went wrong, we should timeout before the test times out, kill the process and report the original exception. --- test/launcher.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/launcher.spec.js b/test/launcher.spec.js index 093e0296fa..c18521c51e 100644 --- a/test/launcher.spec.js +++ b/test/launcher.spec.js @@ -58,7 +58,7 @@ describe('Playwright', function() { }); it('should handle exception', async({browserType, defaultBrowserOptions}) => { const e = new Error('Dummy'); - const options = { ...defaultBrowserOptions, __testHookBeforeCreateBrowser: () => { throw e; } }; + const options = { ...defaultBrowserOptions, __testHookBeforeCreateBrowser: () => { throw e; }, timeout: 9000 }; const error = await browserType.launch(options).catch(e => e); expect(error).toBe(e); });