Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7100c6b5
Commit
7100c6b5
authored
Jun 06, 2019
by
Winnie Hellmann
Committed by
Phil Hughes
Jun 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increase Jest timeout on CI to 5 seconds
parent
70a717da
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
spec/frontend/helpers/timeout.js
spec/frontend/helpers/timeout.js
+14
-2
spec/frontend/test_setup.js
spec/frontend/test_setup.js
+1
-1
No files found.
spec/frontend/helpers/timeout.js
View file @
7100c6b5
...
@@ -5,7 +5,13 @@ const IS_DEBUGGING = process.execArgv.join(' ').includes('--inspect-brk');
...
@@ -5,7 +5,13 @@ const IS_DEBUGGING = process.execArgv.join(' ').includes('--inspect-brk');
let
testTimeoutNS
;
let
testTimeoutNS
;
export
const
setTestTimeout
=
newTimeoutMS
=>
{
export
const
setTestTimeout
=
newTimeoutMS
=>
{
testTimeoutNS
=
newTimeoutMS
*
NS_PER_MS
;
const
newTimeoutNS
=
newTimeoutMS
*
NS_PER_MS
;
// never accept a smaller timeout than the default
if
(
newTimeoutNS
<
testTimeoutNS
)
{
return
;
}
testTimeoutNS
=
newTimeoutNS
;
jest
.
setTimeout
(
newTimeoutMS
);
jest
.
setTimeout
(
newTimeoutMS
);
};
};
...
@@ -13,7 +19,13 @@ export const setTestTimeout = newTimeoutMS => {
...
@@ -13,7 +19,13 @@ export const setTestTimeout = newTimeoutMS => {
// Useful for tests with jQuery, which is very slow in big DOMs.
// Useful for tests with jQuery, which is very slow in big DOMs.
let
temporaryTimeoutNS
=
null
;
let
temporaryTimeoutNS
=
null
;
export
const
setTestTimeoutOnce
=
newTimeoutMS
=>
{
export
const
setTestTimeoutOnce
=
newTimeoutMS
=>
{
temporaryTimeoutNS
=
newTimeoutMS
*
NS_PER_MS
;
const
newTimeoutNS
=
newTimeoutMS
*
NS_PER_MS
;
// never accept a smaller timeout than the default
if
(
newTimeoutNS
<
testTimeoutNS
)
{
return
;
}
temporaryTimeoutNS
=
newTimeoutNS
;
};
};
export
const
initializeTestTimeout
=
defaultTimeoutMS
=>
{
export
const
initializeTestTimeout
=
defaultTimeoutMS
=>
{
...
...
spec/frontend/test_setup.js
View file @
7100c6b5
...
@@ -15,7 +15,7 @@ afterEach(() =>
...
@@ -15,7 +15,7 @@ afterEach(() =>
}),
}),
);
);
initializeTestTimeout
(
500
);
initializeTestTimeout
(
process
.
env
.
CI
?
5000
:
500
);
// fail tests for unmocked requests
// fail tests for unmocked requests
beforeEach
(
done
=>
{
beforeEach
(
done
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment