Commit 5c687e23 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'convert-poll-interval-to-string' into 'master'

Convert value to string before setting Poll-Interval header

See merge request !10477
parents 271ab515 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?
......
...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment