Skip to content

Commit 2635e0d

Browse files
authored
Add polling support for contract test service (#198)
1 parent cb5de9d commit 2635e0d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

contract-tests/client_entity.rb

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ def initialize(log, config)
1414
streaming = config[:streaming]
1515
opts[:stream_uri] = streaming[:baseUri] if !streaming[:baseUri].nil?
1616
opts[:initial_reconnect_delay] = streaming[:initialRetryDelayMs] / 1_000.0 if !streaming[:initialRetryDelayMs].nil?
17+
elsif config[:polling]
18+
polling = config[:polling]
19+
opts[:stream] = false
20+
opts[:base_uri] = polling[:baseUri] if !polling[:baseUri].nil?
21+
opts[:poll_interval] = polling[:pollIntervalMs] / 1_000.0 if !polling[:pollIntervalMs].nil?
1722
end
1823

1924
if config[:events]

contract-tests/service.rb

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
{
2626
capabilities: [
2727
'server-side',
28+
'server-side-polling',
2829
'all-flags-with-reasons',
2930
'all-flags-client-side-only',
3031
'all-flags-details-only-for-tracked-flags',

0 commit comments

Comments
 (0)