File tree Expand file tree Collapse file tree
packages/devtools_app/test_driver Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,9 +16,23 @@ const _goldensDirectoryPath = 'integration_test/test_infra/goldens';
1616const _failuresDirectoryPath = '$_goldensDirectoryPath /failures' ;
1717const _defaultDiffPercentage = 1.0 ;
1818const _defaultDiffTolerance = 0.003 ;
19+ // The following timeouts were copied from
20+ // https://developer.mozilla.org/en-US/docs/Web/WebDriver/Reference/Timeouts
21+ const _defaultWebDriverPageLoadTimeoutInMins = 5 ;
22+ const _defaultWebDriverScriptTimeoutInSeconds = 30 ;
1923
2024Future <void > main () async {
2125 final driver = await FlutterDriver .connect ();
26+
27+ // Double the WebDriver timeout limits to handle test flakiness.
28+ // See https://github.com/flutter/devtools/issues/9474
29+ await driver.webDriver.timeouts.setScriptTimeout (
30+ const Duration (seconds: _defaultWebDriverScriptTimeoutInSeconds * 2 ),
31+ );
32+ await driver.webDriver.timeouts.setPageLoadTimeout (
33+ const Duration (minutes: _defaultWebDriverPageLoadTimeoutInMins * 2 ),
34+ );
35+
2236 await integrationDriver (
2337 driver: driver,
2438 onScreenshot:
You can’t perform that action at this time.
0 commit comments