Skip to content

Commit 643246d

Browse files
committed
tests(benchmarks): Use increasing random distributions to sample timeouts
Signed-off-by: Marcel Klehr <[email protected]>
1 parent 2c07470 commit 643246d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6916,8 +6916,8 @@ describe('Floccus', function() {
69166916
let timer = null
69176917
const setInterrupt = () => {
69186918
if (!timeouts.length) {
6919-
timeouts = new Array(1000).fill(0).map(() =>
6920-
ACCOUNT_DATA.type === 'nextcloud-bookmarks' ? random.int(50000, 150000) : (IS_CI ? random.int(200, 10000) : random.int(200, 4000))
6919+
timeouts = new Array(1000).fill(0).map((_, index) =>
6920+
ACCOUNT_DATA.type === 'nextcloud-bookmarks' ? random.int(50000, 150000) : random.int(200, 4000 + (10000 - 4000) * index / 10000)
69216921
)
69226922
}
69236923
const timeout = timeouts[(i++) % 1000]

0 commit comments

Comments
 (0)