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
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
lib/gitlab/polling_interval.rb
lib/gitlab/polling_interval.rb
+1
-1
spec/lib/gitlab/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
...
@@ -12,7 +12,7 @@ module Gitlab
value
=
-
1
value
=
-
1
end
end
response
.
headers
[
HEADER_NAME
]
=
value
response
.
headers
[
HEADER_NAME
]
=
value
.
to_s
end
end
def
self
.
polling_enabled?
def
self
.
polling_enabled?
...
...
spec/lib/gitlab/polling_interval_spec.rb
View file @
35bafb37
...
@@ -15,7 +15,7 @@ describe Gitlab::PollingInterval, lib: true do
...
@@ -15,7 +15,7 @@ describe Gitlab::PollingInterval, lib: true do
it
'sets value to -1'
do
it
'sets value to -1'
do
polling_interval
.
set_header
(
response
,
interval:
10_000
)
polling_interval
.
set_header
(
response
,
interval:
10_000
)
expect
(
headers
[
'Poll-Interval'
]).
to
eq
(
-
1
)
expect
(
headers
[
'Poll-Interval'
]).
to
eq
(
'-1'
)
end
end
end
end
...
@@ -27,7 +27,7 @@ describe Gitlab::PollingInterval, lib: true do
...
@@ -27,7 +27,7 @@ describe Gitlab::PollingInterval, lib: true do
it
'applies modifier to base interval'
do
it
'applies modifier to base interval'
do
polling_interval
.
set_header
(
response
,
interval:
10_000
)
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
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