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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
1d298e49
Commit
1d298e49
authored
Oct 26, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add changelog and spec
parent
9101cce2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
changelogs/unreleased/38394-smarter-interval.yml
changelogs/unreleased/38394-smarter-interval.yml
+5
-0
spec/javascripts/smart_interval_spec.js
spec/javascripts/smart_interval_spec.js
+12
-0
No files found.
changelogs/unreleased/38394-smarter-interval.yml
0 → 100644
View file @
1d298e49
---
title
:
improve merge request realtime polling performance
merge_request
:
author
:
type
:
fixed
spec/javascripts/smart_interval_spec.js
View file @
1d298e49
...
...
@@ -58,6 +58,18 @@ import '~/smart_interval';
done
();
},
DEFAULT_LONG_TIMEOUT
);
});
it
(
'
does not increment while waiting for callback
'
,
function
(
done
)
{
const
smartInterval
=
createDefaultSmartInterval
({
callback
:
()
=>
new
Promise
(
$
.
noop
),
});
setTimeout
(()
=>
{
const
oneInterval
=
smartInterval
.
cfg
.
startingInterval
*
DEFAULT_INCREMENT_FACTOR
;
expect
(
smartInterval
.
getCurrentInterval
()).
toEqual
(
oneInterval
);
done
();
},
DEFAULT_SHORT_TIMEOUT
);
});
});
describe
(
'
Public methods
'
,
function
()
{
...
...
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