From bd62ef0a46b29ef8165a0e76284ece6a147e4739 Mon Sep 17 00:00:00 2001 From: "Matthew M. Keeler" Date: Tue, 30 Jan 2024 13:55:12 -0500 Subject: [PATCH] chore: Enable server-side-polling in contract tests (#260) (#261) --- contract-tests/client_entity.py | 6 ++++++ contract-tests/service.py | 1 + 2 files changed, 7 insertions(+) diff --git a/contract-tests/client_entity.py b/contract-tests/client_entity.py index 702a6a90..9cb4e0ff 100644 --- a/contract-tests/client_entity.py +++ b/contract-tests/client_entity.py @@ -30,6 +30,12 @@ def __init__(self, tag, config): if streaming.get("baseUri") is not None: opts["stream_uri"] = streaming["baseUri"] _set_optional_time_prop(streaming, "initialRetryDelayMs", opts, "initial_reconnect_delay") + else: + opts['stream'] = False + polling = config["polling"] + if polling.get("baseUri") is not None: + opts["base_uri"] = polling["baseUri"] + _set_optional_time_prop(polling, "pollIntervalMs", opts, "poll_interval") if config.get("events") is not None: events = config["events"] diff --git a/contract-tests/service.py b/contract-tests/service.py index 16a078ad..507354c4 100644 --- a/contract-tests/service.py +++ b/contract-tests/service.py @@ -61,6 +61,7 @@ def status(): body = { 'capabilities': [ 'server-side', + 'server-side-polling', 'all-flags-with-reasons', 'all-flags-client-side-only', 'all-flags-details-only-for-tracked-flags',