Skip to content

Commit f9c2916

Browse files
committed
fix: Increase interrupt timeouts
Signed-off-by: Marcel Klehr <[email protected]>
1 parent 0769159 commit f9c2916

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/test/test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ describe('Floccus', function() {
6868
this.slow(20000) // 20s is slow
6969

7070
const params = (new URL(window.location.href)).searchParams
71-
let SERVER, CREDENTIALS, ACCOUNTS, APP_VERSION, SEED, BROWSER, RANDOM_MANIPULATION_ITERATIONS, TEST_URL
71+
let SERVER, CREDENTIALS, ACCOUNTS, APP_VERSION, SEED, BROWSER, RANDOM_MANIPULATION_ITERATIONS, TEST_URL, IS_CI
7272
SERVER =
7373
params.get('server') ||
7474
'http://localhost'
@@ -79,6 +79,7 @@ describe('Floccus', function() {
7979
}
8080
APP_VERSION = params.get('app_version') || 'stable'
8181
BROWSER = params.get('browser') || 'firefox'
82+
IS_CI = (params.get('ci') || 'false') === 'true'
8283

8384
SEED = (new URL(window.location.href)).searchParams.get('seed') || Math.random() + ''
8485
console.log('RANDOMNESS SEED', SEED)
@@ -6916,7 +6917,7 @@ describe('Floccus', function() {
69166917
const setInterrupt = () => {
69176918
if (!timeouts.length) {
69186919
timeouts = new Array(1000).fill(0).map(() =>
6919-
ACCOUNT_DATA.type === 'nextcloud-bookmarks' ? random.int(50000, 150000) : random.int(200, 6000)
6920+
ACCOUNT_DATA.type === 'nextcloud-bookmarks' ? random.int(50000, 150000) : (IS_CI ? random.int(200, 10000) : random.int(200, 5000))
69206921
)
69216922
}
69226923
const timeout = timeouts[(i++) % 1000]

test/selenium-runner.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ installConsoleHandler()
9898
testUrl += `dist/html/test.html?grep=${process.env.FLOCCUS_TEST}&server=${server}&app_version=${process.env.APP_VERSION}&browser=${process.env.SELENIUM_BROWSER}`
9999

100100
testUrl += `&test_url=http://nextcloud/`
101+
testUrl += `&ci=true`
101102

102103
if (process.env.FLOCCUS_TEST.includes('google-drive')) {
103104
testUrl += `&password=${process.env.GOOGLE_API_REFRESH_TOKEN}`

0 commit comments

Comments
 (0)