Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mocks warm up #833

Merged
merged 3 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions nmostesting/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
# Please consult the documentation for instructions on how to adjust these values for common testing setups including
# unicast DNS-SD and HTTPS testing.

# Number of seconds to wait after starting the mock DNS server, authorization server, etc. before running tests.
# This gives the API or client under test a chance to use these services before any test case is run.
MOCK_SERVICES_WARM_UP_DELAY = 0

# Enable or disable DNS-SD advertisements. Browsing is always permitted.
# The IS-04 Node tests create a mock registry on the network unless the `ENABLE_DNS_SD` parameter is set to `False`.
Expand Down
7 changes: 7 additions & 0 deletions nmostesting/NMOSTesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,13 @@ def main(args):
print(" * Testing tool running on 'http://{}:{}'. Version '{}'"
.format(get_default_ip(), core_app.config['PORT'], TOOL_VERSION))

# Give an API or client that is already running a chance to use the mock services
# before running any test cases
if CONFIG.MOCK_SERVICES_WARM_UP_DELAY:
garethsb marked this conversation as resolved.
Show resolved Hide resolved
print(" * Waiting for {} seconds to allow discovery of mock services"
.format(CONFIG.MOCK_SERVICES_WARM_UP_DELAY))
time.sleep(CONFIG.MOCK_SERVICES_WARM_UP_DELAY)

exit_code = 0
if "suite" not in vars(CMD_ARGS):
# Interactive testing mode. Await user input.
Expand Down
Loading