BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
35bafb37
Commit
35bafb37
authored
Apr 05, 2017
by
Adam Niedzielski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert value to string before setting Poll-Interval header
parent
d4349ba6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
polling_interval.rb
lib/gitlab/polling_interval.rb
+1
-1
polling_interval_spec.rb
spec/lib/gitlab/polling_interval_spec.rb
+2
-2
No files found.
lib/gitlab/polling_interval.rb
View file @
35bafb37
...
...
@@ -12,7 +12,7 @@ module Gitlab
value
=
-
1
end
response
.
headers
[
HEADER_NAME
]
=
value
response
.
headers
[
HEADER_NAME
]
=
value
.
to_s
end
def
self
.
polling_enabled?
...
...
spec/lib/gitlab/polling_interval_spec.rb
View file @
35bafb37
...
...
@@ -15,7 +15,7 @@ describe Gitlab::PollingInterval, lib: true do
it
'sets value to -1'
do
polling_interval
.
set_header
(
response
,
interval:
10_000
)
expect
(
headers
[
'Poll-Interval'
]).
to
eq
(
-
1
)
expect
(
headers
[
'Poll-Interval'
]).
to
eq
(
'-1'
)
end
end
...
...
@@ -27,7 +27,7 @@ describe Gitlab::PollingInterval, lib: true do
it
'applies modifier to base interval'
do
polling_interval
.
set_header
(
response
,
interval:
10_000
)
expect
(
headers
[
'Poll-Interval'
]).
to
eq
(
3333
)
expect
(
headers
[
'Poll-Interval'
]).
to
eq
(
'3333'
)
end
end
end
...
...
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