Skip to content

Commit

Permalink
Wait between retries when launching stories tab (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristof-mattei authored Mar 25, 2020
1 parent 7a59ba3 commit 7128c7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/target-chrome-core/src/create-chrome-target.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const {
} = require('@loki/core');
const presets = require('./presets.json');

const RETRY_LOADING_STORIES_TIMEOUT = 10000;
const LOADING_STORIES_TIMEOUT = 60000;
const CAPTURING_SCREENSHOT_TIMEOUT = 30000;
const CAPTURING_SCREENSHOT_RETRY_BACKOFF = 500;
Expand Down Expand Up @@ -262,7 +263,7 @@ function createChromeTarget(
)}&selectedStory=${encodeURIComponent(story)}`;

const launchStoriesTab = withTimeout(LOADING_STORIES_TIMEOUT)(
withRetries(2)(async url => {
withRetries(5, RETRY_LOADING_STORIES_TIMEOUT)(async url => {
const tab = await launchNewTab({
width: 100,
height: 100,
Expand Down

0 comments on commit 7128c7b

Please sign in to comment.